403Webshell
Server IP : 162.144.4.212  /  Your IP : 216.73.216.108
Web Server : Apache
System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User : cozeellc ( 2980)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/libexec/oracle-cloud-agent/plugins/osms/multiprocessing/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/libexec/oracle-cloud-agent/plugins/osms/multiprocessing/resource_sharer.pyc
a

���d�@s�ddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	dgZ
ejdkrxe
dg7Z
Gd	d�de�Z
ne
d
g7Z
Gdd
�d
e�ZGdd
�d
e�Ze�ZejZdS)�N�)�process)�	reduction)�util�stop�win32�	DupSocketc@s eZdZdZdd�Zdd�ZdS)rzPicklable wrapper for a socket.cs(|����fdd�}t�|�j�|_dS)Ncs��|�}|�|�dS�N)�share�
send_bytes)�conn�pidr
��new_sock��7/usr/lib64/python3.9/multiprocessing/resource_sharer.py�sends
z DupSocket.__init__.<locals>.send)�dup�_resource_sharer�register�close�_id)�self�sockrrrr�__init__szDupSocket.__init__cCsBt�|j��"}|��}t�|�Wd�S1s40YdS)z1Get the socket.  This should only be called once.N)r�get_connectionr�
recv_bytes�socket�	fromshare)rrr
rrr�detach$szDupSocket.detachN��__name__�
__module__�__qualname__�__doc__rrrrrrrs�DupFdc@s eZdZdZdd�Zdd�ZdS)r%z-Wrapper for fd which can be used at any time.cs4t�|���fdd�}�fdd�}t�||�|_dS)Ncst�|�|�dSr	)r�send_handle)rr
��new_fdrrr1szDupFd.__init__.<locals>.sendcst���dSr	)�osrrr'rrr3szDupFd.__init__.<locals>.close)r)rrrr)r�fdrrrr'rr/s
zDupFd.__init__cCs:t�|j��}t�|�Wd�S1s,0YdS)z-Get the fd.  This should only be called once.N)rrrr�recv_handle)rrrrrr7szDupFd.detachNr rrrrr%-sc@sNeZdZdZdd�Zdd�Zedd��Zdd	d
�Zdd�Z	d
d�Z
dd�ZdS)�_ResourceSharerz.Manager for resources using background thread.cCs:d|_i|_t��|_d|_d|_d|_t�	|t
j�dS)Nr)�_key�_cache�	threading�Lock�_lock�	_listener�_address�_threadr�register_after_forkr,�
_afterfork)rrrrr?s
z_ResourceSharer.__init__cCsf|j�L|jdur|��|jd7_||f|j|j<|j|jfWd�S1sX0YdS)z+Register resource, returning an identifier.Nr)r1r3�_startr-r.)rrrrrrrHs
z_ResourceSharer.registercCs<ddlm}|\}}||t��jd�}|�|t��f�|S)z<Return connection from which to receive identified resource.r��Client��authkey)�
connectionr9r�current_processr;rr)�getpid)�identr9�address�key�crrrrQs
z_ResourceSharer.get_connectionNcCs�ddlm}|j��|jdur�||jt��jd�}|�d�|��|j	�
|�|j	��rdt�
d�|j��d|_	d|_d|_|j��D]\}\}}|�q�|j��Wd�n1s�0YdS)z:Stop the background thread and clear registered resources.rr8Nr:z._ResourceSharer thread did not stop when asked)r<r9r1r3rr=r;rrr4�join�is_aliver�sub_warningr2r.�items�clear)r�timeoutr9rBrArrrrrrZs$
�



z_ResourceSharer.stopcCs\|j��D]\}\}}|�q
|j��|j��|jdurF|j��d|_d|_d|_dSr	)	r.rFrGr1�_at_fork_reinitr2rr3r4)rrArrrrrr6os



z_ResourceSharer._afterforkcCsjddlm}|jdusJd��t�d�|t��jd�|_|jj|_	t
j|jd�}d|_
|��||_dS)Nr)�ListenerzAlready have Listenerz0starting listener and thread for sending handlesr:)�targetT)r<rJr2r�debugrr=r;r@r3r/�Thread�_serve�daemon�startr4)rrJ�trrrr7zs

z_ResourceSharer._startcCs�ttd�rt�tjt���z�|j���f}|��}|durJWd�Wq�|\}}|j�	|�\}}z|||�W|�n|�0Wd�n1s�0YWqt
��s�tj
t���Yq0qdS)N�pthread_sigmask)�hasattr�signalrR�	SIG_BLOCK�
valid_signalsr2�accept�recvr.�popr�
is_exiting�sys�
excepthook�exc_info)rr�msgrA�destination_pidrrrrrrN�s
2z_ResourceSharer._serve)N)r!r"r#r$rr�staticmethodrrr6r7rNrrrrr,=s		

r,)r)rTrr[r/�r�contextrr�__all__�platform�objectrr%r,rrrrrr�<module>s 


\

Youez - 2016 - github.com/yon3zu
LinuXploit