Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/multiprocessing/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/multiprocessing/__pycache__/resource_sharer.cpython-311.pyc
�

�,d���ddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	dgZ
ejdkre
dgz
Z
Gd	�de��Z
ne
d
gz
Z
Gd�d
e��ZGd�d
e��Ze��ZejZdS)�N�)�process)�	reduction)�util�stop�win32�	DupSocketc��eZdZdZd�Zd�ZdS)r	zPicklable wrapper for a socket.c���|�����fd�}t�|�j��|_dS)Nc�\����|��}|�|��dS�N)�share�
send_bytes)�conn�pidr�new_socks   ��F/opt/alt/python311/lib64/python3.11/multiprocessing/resource_sharer.py�sendz DupSocket.__init__.<locals>.sends,��� ���s�+�+������&�&�&�&�&�)�dup�_resource_sharer�register�close�_id)�self�sockrrs   @r�__init__zDupSocket.__init__sH����x�x�z�z�H�
'�
'�
'�
'�
'�(�0�0��x�~�F�F�D�H�H�Hrc���t�|j��5}|���}t	j|��cddd��S#1swxYwYdS)z1Get the socket.  This should only be called once.N)r�get_connectionr�
recv_bytes�socket�	fromshare)rrrs   r�detachzDupSocket.detach$s���!�0�0���:�:�
/�d����)�)���'��.�.�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/�
/����
/�
/�
/�
/�
/�
/s�(A�A�AN��__name__�
__module__�__qualname__�__doc__rr#�rrr	r	s;������-�-�	G�	G�	G�	/�	/�	/�	/�	/r�DupFdc��eZdZdZd�Zd�ZdS)r*z-Wrapper for fd which can be used at any time.c���tj|����fd�}�fd�}t�||��|_dS)Nc�4��tj|�|��dSr
)r�send_handle)rr�new_fds  �rrzDupFd.__init__.<locals>.send1s����%�d�F�C�8�8�8�8�8rc�0��tj���dSr
)�osr)r/s�rrzDupFd.__init__.<locals>.close3s������ � � � � r)r1rrrr)r�fdrrr/s    @rrzDupFd.__init__/s]����V�B�Z�Z�F�
9�
9�
9�
9�
9�
!�
!�
!�
!�
!�'�0�0��u�=�=�D�H�H�Hrc��t�|j��5}tj|��cddd��S#1swxYwYdS)z-Get the fd.  This should only be called once.N)rrrr�recv_handle)rrs  rr#zDupFd.detach7s���!�0�0���:�:�
3�d� �,�T�2�2�
3�
3�
3�
3�
3�
3�
3�
3�
3�
3�
3�
3����
3�
3�
3�
3�
3�
3s�A�A�ANr$r)rrr*r*-s8������;�;�	>�	>�	>�	3�	3�	3�	3�	3rc�N�eZdZdZd�Zd�Zed���Zd
d�Zd�Z	d�Z
d	�ZdS)�_ResourceSharerz.Manager for resources using background thread.c��d|_i|_tj��|_d|_d|_d|_tj	|tj��dS)Nr)�_key�_cache�	threading�Lock�_lock�	_listener�_address�_threadr�register_after_forkr6�
_afterfork)rs rrz_ResourceSharer.__init__?sP����	�����^�%�%��
������
����� ���'A�B�B�B�B�Brc���|j5|j�|���|xjdz
c_||f|j|j<|j|jfcddd��S#1swxYwYdS)z+Register resource, returning an identifier.Nr)r<r>�_startr8r9)rrrs   rrz_ResourceSharer.registerHs���
�Z�	.�	.��}�$����
�
�
��I�I��N�I�I�&*�E�]�D�K��	�"��M�4�9�-�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.����	.�	.�	.�	.�	.�	.s�A
A�A#�&A#c��ddlm}|\}}||tj��j���}|�|t
j��f��|S)z<Return connection from which to receive identified resource.r��Client��authkey)�
connectionrFr�current_processrHrr1�getpid)�identrF�address�key�cs     rrz_ResourceSharer.get_connectionQsa��	'�&�&�&�&�&������F�7�G�$;�$=�$=�$E�F�F�F��	����R�Y�[�[�!�"�"�"��rNc�x�ddlm}|j5|j��||jt	j��j���}|�d��|���|j	�
|��|j	���rtj
d��|j���d|_	d|_d|_|j���D]\}\}}|���|j���ddd��dS#1swxYwYdS)z:Stop the background thread and clear registered resources.rrENrGz._ResourceSharer thread did not stop when asked)rIrFr<r>rrJrHrrr?�join�is_aliver�sub_warningr=r9�items�clear)r�timeoutrFrOrNrrs       rrz_ResourceSharer.stopZs���&�&�&�&�&�&�
�Z�	$�	$��}�(��F�4�=�#*�#:�#<�#<�#D�F�F�F�����t�������	�	�	���!�!�'�*�*�*��<�(�(�*�*�<��$�&;�<�<�<���$�$�&�&�&�#��� $��
�!%���*.�+�*;�*;�*=�*=���&�C��$���E�G�G�G�G���!�!�#�#�#�!	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$����	$�	$�	$�	$�	$�	$s�DD/�/D3�6D3c�,�|j���D]\}\}}|���|j���|j���|j�|j���d|_d|_d|_dSr
)	r9rTrUr<�_at_fork_reinitr=rr>r?)rrNrrs    rrAz_ResourceSharer._afterforkos���"&�+�"3�"3�"5�"5�	�	��C��$���E�G�G�G�G���������
�"�"�$�$�$��>�%��N� � �"�"�"������
�����rc�D�ddlm}|j�
Jd���tjd��|tj��j���|_|jj|_	tj|j���}d|_
|���||_dS)Nr)�ListenerzAlready have Listenerz0starting listener and thread for sending handlesrG)�targetT)rIrZr=r�debugrrJrHrMr>r:�Thread�_serve�daemon�startr?)rrZ�ts   rrCz_ResourceSharer._startzs���(�(�(�(�(�(��~�%�%�'>�%�%�%��
�E�F�F�F�!��'�*A�*C�*C�*K�L�L�L�����.��
���D�K�0�0�0�����	���	�	�	�����rc�D�ttd��r0tjtjtj����		|j���5}|���}|�	ddd��dS|\}}|j�	|��\}}	|||��|��n#|��wxYw	ddd��n#1swxYwYn9#tj��stj
tj���YnxYw��)N�pthread_sigmask)�hasattr�signalrc�	SIG_BLOCK�
valid_signalsr=�accept�recvr9�popr�
is_exiting�sys�
excepthook�exc_info)rr�msgrN�destination_pidrrs       rr^z_ResourceSharer._serve�so���6�,�-�-�	M��"�6�#3�V�5I�5K�5K�L�L�L�	4�

4��^�*�*�,�,�	 ���)�)�+�+�C��{��	 �	 �	 �	 �	 �	 �	 �	 �,/�(�C��"&�+�/�/�#�"6�"6�K�D�%� ���T�?�3�3�3������������������	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 ���
4���(�(�4��N�C�L�N�N�3�3������	4sT�C(�!C�9C(�"C�)C�5C�C�C�C(�C � C(�#C �$C(�(4Dr
)r%r&r'r(rr�staticmethodrrrArCr^r)rrr6r6=s�������8�8�C�C�C�.�.�.�����\��$�$�$�$�*	�	�	�	�	�	�4�4�4�4�4rr6)r1rer!rlr:�r�contextrr�__all__�platform�objectr	r*r6rrr)rr�<module>rwsE��
�	�	�	�
�
�
�
�
�
�
�
�
�
�
�
������������������������(���<�7�����}��G�
/�
/�
/�
/�
/�F�
/�
/�
/�
/� ��y��G�
3�
3�
3�
3�
3��
3�
3�
3� Y4�Y4�Y4�Y4�Y4�f�Y4�Y4�Y4�x#�?�$�$������r

ZeroDay Forums Mini