HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/multiprocessing/__pycache__/resource_sharer.cpython-310.opt-2.pyc
o

�i�@s�ddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	dgZ
ejdkr<e
dg7Z
Gd	d�de�Z
n
e
d
g7Z
Gdd
�d
e�ZGdd
�d
e�Ze�ZejZdS)�N�)�process)�	reduction)�util�stop�win32�	DupSocketc@�eZdZ	dd�Zdd�ZdS)rcs(|����fdd�}t�|�j�|_dS)Ncs��|�}|�|�dS�N)�share�
send_bytes)�conn�pidr�Znew_sock��</usr/local/lib/python3.10/multiprocessing/resource_sharer.py�sends
z DupSocket.__init__.<locals>.send)�dup�_resource_sharer�register�close�_id)�self�sockrrrr�__init__szDupSocket.__init__cCsD	t�|j��}|��}t�|�Wd�S1swYdSr
)r�get_connectionr�
recv_bytes�socketZ	fromshare)rr
rrrr�detach$s
$�zDupSocket.detachN��__name__�
__module__�__qualname__rrrrrrrs�DupFdc@r	)r#cs4t�|���fdd�}�fdd�}t�||�|_dS)Ncst�|�|�dSr
)r�send_handle)r
r�Znew_fdrrr1szDupFd.__init__.<locals>.sendcst���dSr
)�osrrr%rrr3szDupFd.__init__.<locals>.close)r&rrrr)r�fdrrrr%rr/s
zDupFd.__init__cCs<	t�|j��
}t�|�Wd�S1swYdSr
)rrrr�recv_handle)rr
rrrr7s$�zDupFd.detachNrrrrrr#-sc@sLeZdZ	dd�Zdd�Zedd��Zddd	�Zd
d�Zdd
�Z	dd�Z
dS)�_ResourceSharercCs: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__cCsh	|j�&|jdur|��|jd7_||f|j|j<|j|jfWd�S1s-wYdS)Nr)r.r0�_startr*r+)rrrrrrrHs

$�z_ResourceSharer.registercCs>	ddlm}|\}}||t��jd�}|�|t��f�|S)Nr��Client��authkey)�
connectionr6r�current_processr8rr&�getpid)�identr6�address�key�crrrrQsz_ResourceSharer.get_connectionNcCs�	ddlm}|j�[|jdur]||jt��jd�}|�d�|��|j	�
|�|j	��r3t�
d�|j��d|_	d|_d|_|j��D]	\}\}}|�qF|j��Wd�dSWd�dS1shwYdS)Nrr5r7z._ResourceSharer thread did not stop when asked)r9r6r.r0rr:r8rrr1�join�is_aliver�sub_warningr/r+�items�clear)r�timeoutr6r?r>rrrrrrZs,
�



�"�z_ResourceSharer.stopcCs\|j��D]	\}\}}|�q|j��|j��|jdur#|j��d|_d|_d|_dSr
)	r+rCrDr.�_at_fork_reinitr/rr0r1)rr>rrrrrr3os




z_ResourceSharer._afterforkcCsXddlm}t�d�|t��jd�|_|jj|_	t
j|jd�}d|_
|��||_dS)Nr)�Listenerz0starting listener and thread for sending handlesr7)�targetT)r9rGr�debugrr:r8r/r=r0r,�Thread�_serve�daemon�startr1)rrG�trrrr4zs


z_ResourceSharer._startcCs�ttd�rt�tjt���	zD|j���5}|��}|dur(	Wd�WdS|\}}|j�	|�\}}z
|||�W|�n|�wWd�n1sMwYWnt
��sbtj
t���Yq)N�pthread_sigmask)�hasattr�signalrO�	SIG_BLOCK�
valid_signalsr/�accept�recvr+�popr�
is_exiting�sys�
excepthook�exc_info)rr
�msgr>�destination_pidrrrrrrK�s*
���
��z_ResourceSharer._server
)r r!r"rr�staticmethodrrr3r4rKrrrrr)=s		

r))r&rQrrXr,�r�contextrr�__all__�platform�objectrr#r)rrrrrr�<module>s"



\