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__/process.cpython-311.pyc
�

�,dJ/��&�gd�ZddlZddlZddlZddlZddlZddlmZ	ej�	ej
����Zn
#e$rdZYnwxYwd�Z
d�Zd�Zd�ZGd�d	e��ZGd
�de��ZGd�d
e��ZGd�de��Zdae��aejd��ae��a[iZeej� ����D] \Z!Z"e!dd�dkr
de!vr	de!��ee"<�![!["e��Z#dS))�BaseProcess�current_process�active_children�parent_process�N)�WeakSetc��tS)z@
    Return process object representing the current process
    )�_current_process���>/opt/alt/python311/lib64/python3.11/multiprocessing/process.pyrr%s
���rc�F�t��tt��S)zN
    Return list of process objects corresponding to live child processes
    )�_cleanup�list�	_childrenr
rrrr+s��
�J�J�J��	�?�?�rc��tS)z?
    Return process object representing the parent process
    )�_parent_processr
rrrr3s
���rc��tt��D]5}|j����t�|���6dS�N)rr�_popen�poll�discard)�ps rrr=sF��
�)�_�_�!�!���8�=�=�?�?�&����a� � � ��!�!rc�n�eZdZdZd�Zddddifdd�d�Zd�Zd�Zd	�Zd
�Z	d�Z
dd�Zd
�Zd�Z
ed���Zejd���Zed���Zejd���Zed���Zejd���Zed���Zed���ZeZed���Zd�Zdd�Zed���ZdS)rz�
    Process objects represent activity that is run in a separate process

    The class is analogous to `threading.Thread`
    c��t�r)�NotImplementedError��selfs r�_PopenzBaseProcess._PopenMs��!�!rNr
)�daemonc�N�|�
Jd���tt��}tj|fz|_tj���|_t
j��|_tj	|_
d|_d|_||_
t|��|_t!|��|_|p;t%|��jdzd�d�|jD����z|_|�||_t.�|��dS)Nz#group argument must be None for nowF�-�:c3�4K�|]}t|��V��dSr)�str)�.0�is  r�	<genexpr>z'BaseProcess.__init__.<locals>.<genexpr>^s(����=�=��c�!�f�f�=�=�=�=�=�=r)�next�_process_counterr	�	_identity�_config�copy�os�getpid�_parent_pid�name�_parent_namer�_closed�_target�tuple�_args�dict�_kwargs�type�__name__�join�_namer�	_dangling�add)r�group�targetr0�args�kwargsr�counts        r�__init__zBaseProcess.__init__Ps����}�}�C�}�}�}��%�&�&��)�3�u�h�>���'�/�4�4�6�6����9�;�;���,�1�������������4�[�[��
��F�|�|����>�T�$�Z�Z�0�3�6��X�X�=�=�d�n�=�=�=�=�=�>��
��� �D�K��
�
�d�����rc�2�|jrtd���dS)Nzprocess object is closed)r2�
ValueErrorrs r�
_check_closedzBaseProcess._check_closedcs%���<�	9��7�8�8�8�	9�	9rc�F�|jr|j|ji|j��dSdS)zQ
        Method to be run in sub-process; can be overridden in sub-class
        N)r3r5r7rs r�runzBaseProcess.rungs9���<�	6��D�L�$�*�5���5�5�5�5�5�	6�	6rc��|���|j�
Jd���|jtj��ks
Jd���t
j�d��r
Jd���t��|�	|��|_|jj
|_|`|`
|`t�|��dS)z%
        Start child process
        Nzcannot start a process twicez:can only start a process object created by current processrz3daemonic processes are not allowed to have children)rFrr/r-r.r	r+�getrr�sentinel�	_sentinelr3r5r7rr=rs r�startzBaseProcess.startns���	
�������{�"�"�$B�"�"�"���2�9�;�;�.�.�.�K�/�.�.�#�+�/�/��9�9�	E�	E�D�	E�	E�	E��
�
�
��k�k�$�'�'�����-���
�L�$�*�d�l��
�
�d�����rc�`�|���|j���dS)zT
        Terminate process; sends SIGTERM signal or uses TerminateProcess()
        N)rFr�	terminaters rrOzBaseProcess.terminate�s0��	
��������������rc�`�|���|j���dS)zT
        Terminate process; sends SIGKILL signal or uses TerminateProcess()
        N)rFr�killrs rrQzBaseProcess.kill�s0��	
��������������rc��|���|jtj��ks
Jd���|j�
Jd���|j�|��}|�t�|��dSdS)z5
        Wait until child process terminates
        zcan only join a child processNzcan only join a started process)rFr/r-r.r�waitrr)r�timeout�ress   rr:zBaseProcess.join�s���	
��������2�9�;�;�.�.�.�0O�.�.�.��{�&�&�(I�&�&�&��k���w�'�'���?����d�#�#�#�#�#��?rc��|���|turdS|jtj��ks
Jd���|j�dS|j���}|�dSt�|��dS)z1
        Return whether process is alive
        Tzcan only test a child processNF)	rFr	r/r-r.rrrr)r�
returncodes  r�is_alivezBaseProcess.is_alive�s���	
�������#�#�#��4���2�9�;�;�.�.�.�0O�.�.�.��;���5��[�%�%�'�'�
����4����d�#�#�#��5rc���|j�d|j����td���|j���d|_|`t
�|��d|_dS)z�
        Close the Process object.

        This method releases resources held by the Process object.  It is
        an error to call this method if the child process is still running.
        Nz^Cannot close a process while it is still running. You should first call join() or terminate().T)rrrE�closerLrrr2rs rrZzBaseProcess.close�sz���;�"��{���!�!�)� �"P�Q�Q�Q��K�������D�K������d�#�#�#�����rc��|jSr)r;rs rr0zBaseProcess.name�s
���z�rc�R�t|t��s
Jd���||_dS)Nzname must be a string)�
isinstancer$r;)rr0s  rr0zBaseProcess.name�s,���$��$�$�=�=�&=�=�=�=���
�
�
rc�8�|j�dd��S)z4
        Return whether process is a daemon
        rF)r+rJrs rrzBaseProcess.daemon�s��
�|����%�0�0�0rc�<�|j�
Jd���||jd<dS)z1
        Set whether process is a daemon
        Nzprocess has already startedr)rr+)r�daemonics  rrzBaseProcess.daemon�s-��
�{�"�"�$A�"�"�"�!)���X���rc��|jdS)N�authkey)r+rs rrbzBaseProcess.authkey�s���|�I�&�&rc�4�t|��|jd<dS)z2
        Set authorization key of process
        rbN)�AuthenticationStringr+)rrbs  rrbzBaseProcess.authkey�s��
#7�w�"?�"?���Y���rc�x�|���|j�|jS|j���S)zM
        Return exit code of process or `None` if it has yet to stop
        )rFrrrs r�exitcodezBaseProcess.exitcode�s:��
	
�������;���;���{���!�!�!rc��|���|turtj��S|jo|jjS)zU
        Return identifier (PID) of process or `None` if it has yet to start
        )rFr	r-r.r�pidrs r�identzBaseProcess.ident�s?��
	
�������#�#�#��9�;�;���;�2�4�;�?�2rc�v�|���	|jS#t$rtd��d�wxYw)z{
        Return a file descriptor (Unix) or handle (Windows) suitable for
        waiting for process termination.
        zprocess not startedN)rFrL�AttributeErrorrErs rrKzBaseProcess.sentinel�sO��	
������	>��>�!���	>�	>�	>��2�3�3��=�	>���s��8c��d}|turd}nS|jrd}nI|jtj��krd}n*|j�d}n |j���}|�d}nd}t|��jd|j	zg}|j�"|�
d|jjz��|�
d|jz��|�
|��|�3t�
||��}|�
d	|z��|jr|�
d
��dd�|��zS)
N�started�closed�unknown�initial�stoppedzname=%rzpid=%sz	parent=%szexitcode=%srz<%s>� )r	r2r/r-r.rrr8r9r;�appendrh�_exitcode_to_namerJrr:)rrf�status�infos    r�__repr__zBaseProcess.__repr__sF�����#�#�#��F�F�
�\�	#��F�F�
�
�����
,�
,��F�F�
�[�
 ��F�F��{�'�'�)�)�H��#�"���"���T�
�
�#�Y���%;�<���;�"��K�K��4�;�?�2�3�3�3����K�$�"2�2�3�3�3����F������(�,�,�X�x�@�@�H��K�K�
��0�1�1�1��;�	"��K�K��!�!�!��������&�&rc���ddlm}m}	|j�|�|j��tjd��at��a	|�
��t}|at|j
|j|��at jr%t!j�����	|���~n#~wxYw|�d��	|���d}|���n#|���wxYwn�#t0$rl}|j�d}nXt5|jt6��r|j}n6t8j�t?|j��dz��d}Yd}~nKd}~wd}ddl }t8j�d|j!z��|�"��YnxYwt!j#��|�d|z��|�$��nD#t!j#��|�d|z��|�$��wxYw|S)N�)�util�contextz child process calling self.run()r�
zProcess %s:
z process exiting with exitcode %d)%�rzr{�
_start_method�_force_start_method�	itertoolsrBr)�setr�_close_stdinr	�_ParentProcessr1r/r�	threading�_HAVE_THREAD_NATIVE_ID�main_thread�_set_native_id�_after_forkrvrH�_exit_function�
SystemExit�coder]�int�sys�stderr�writer$�	tracebackr0�	print_exc�	_shutdown�_flush_std_streams)r�parent_sentinelrzr{�old_processrf�er�s        r�
_bootstrapzBaseProcess._bootstrap"s|��#�#�#�#�#�#�#�#�(	&��!�-��+�+�D�,>�?�?�?�(��q�1�1�����I�������*�K�#��,��!�4�#3�_�F�F�O��/�
9��%�'�'�6�6�8�8�8�
 �� � �"�"�"� �K��K������I�I�8�9�9�9�
&����
�
�
����#�#�%�%�%�%���#�#�%�%�%�%����%���	�	�	��v�~�����A�F�C�(�(�
��6����
� � ��Q�V���t�!3�4�4�4������������	"��H������J���_�t�y�8�9�9�9����!�!�!�!�!������!�!�!��I�I�8�8�C�D�D�D��#�#�%�%�%�%��
��!�!�!��I�I�8�8�C�D�D�D��#�#�%�%�%�%�����sc�B,D.�7C
�D.�
C�D.�)D�?D.�D*�*D.�-H*�.
G'�8A"F�H*�AG'�%H*�*AI+c�l�ddlm}|j���|���dS)Nry�rz)r}rz�_finalizer_registry�clear�_run_after_forkersr�s rr�zBaseProcess._after_forkRsA��������� �&�&�(�(�(����!�!�!�!�!rr)r9�
__module__�__qualname__�__doc__rrCrFrHrMrOrQr:rXrZ�propertyr0�setterrrbrfrirhrKrwr��staticmethodr�r
rrrrGs��������
"�"�"�"�$�T��2��������&9�9�9�6�6�6����$ � � ����	$�	$�	$�	$����&���"����X��
�[����[���1�1��X�1��]�*�*��]�*��'�'��X�'�
�^�@�@��^�@��"�"��X�"��3�3��X�3��C�
�	>�	>��X�	>�'�'�'�>.�.�.�.�`�"�"��\�"�"�"rrc��eZdZd�ZdS)rdc�n�ddlm}|���td���tt	|��ffS)Nry)�get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)r{r��	TypeErrorrd�bytes)rr�s  r�
__reduce__zAuthenticationString.__reduce__^sO��/�/�/�/�/�/�����'��2���
�$�e�D�k�k�^�3�3rN)r9r�r�r�r
rrrdrd]s#������4�4�4�4�4rrdc�<�eZdZd�Zd�Zed���Zdd�ZeZdS)r�c�v�d|_||_||_d|_d|_d|_||_i|_dS)Nr
F)r*r;�_pidr/rr2rLr+)rr0rhrKs    rrCz_ParentProcess.__init__ns?�������
���	����������!�������rc�6�ddlm}||jgd���S)Nr�rS�rT��multiprocessing.connectionrSrL)rrSs  rrXz_ParentProcess.is_alivexs1��3�3�3�3�3�3��4���(�!�4�4�4�4�4rc��|jSr)r�rs rriz_ParentProcess.ident|s
���y�rNc�8�ddlm}||jg|���dS)z6
        Wait until parent process terminates
        rr�r�Nr�)rrTrSs   rr:z_ParentProcess.join�s6��	4�3�3�3�3�3���d�n�
�w�/�/�/�/�/�/rr)	r9r�r�rCrXr�rir:rhr
rrr�r�lsb���������5�5�5�����X��0�0�0�0��C�C�Crr�c��eZdZd�Zd�ZdS)�_MainProcessc��d|_d|_d|_d|_d|_tt
jd����dd�|_dS)Nr
�MainProcessF� z/mp)rb�	semprefix)	r*r;r/rr2rdr-�urandomr+rs rrCz_MainProcess.__init__�sN�����"��
����������#7��
�2���#G�#G�%*�,�,����rc��dSrr
rs rrZz_MainProcess.close�s���rN)r9r�r�rCrZr
rrr�r��s2������,�,�,�$
�
�
�
�
rr�ry��SIG�_r!)$�__all__r-r��signalr�r��_weakrefsetr�path�abspath�getcwd�ORIGINAL_DIR�OSErrorrrrr�objectrr�rdr�r�rr	rBr)r�rrtr�__dict__�itemsr0�signumr<r
rr�<module>r�s:������
�	�	�	�
�
�
�
�
�
�
�
�����������������7�?�?�9�2�9�;�;�/�/�L�L�������L�L�L��������������!�!�!�O"�O"�O"�O"�O"�&�O"�O"�O"�l4�4�4�4�4�5�4�4�4������[����B
�
�
�
�
�;�
�
�
�0���<�>�>��"�9�?�1�%�%���C�E�E�	�����D���.�.�0�0�1�1�0�0�L�D�&��B�Q�B�x����3�d�?�?�%/��Z�Z��6�'�"���&�
�G�I�I�	�	�	s�'A�A�A

ZeroDay Forums Mini