Hacked By AnonymousFox

Current Path : /opt/alt/python312/lib64/python3.12/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/multiprocessing/__pycache__/process.cpython-312.pyc

�

�Q�fk/���gd�ZddlZddlZddlZddlZddlZddlmZ	ejjej��Zd�Z
d�Zd�Zd�ZGd�d	e�ZGd
�de�ZGd�d
e�ZGd�de�Zdae�aej2d�ae�a[iZeej>jA��D]\Z!Z"e!dddk(s�de!vs�de!��ee"<�[!["e�Z#y#e$rdZY��wxYw))�BaseProcess�current_process�active_children�parent_process�N)�WeakSetc��tS)z@
    Return process object representing the current process
    )�_current_process���>/opt/alt/python312/lib64/python3.12/multiprocessing/process.pyrr%s
���rc�4�t�tt�S)zN
    Return list of process objects corresponding to live child processes
    )�_cleanup�list�	_childrenr
rrrr+s��
�J��	�?�rc��tS)z?
    Return process object representing the parent process
    )�_parent_processr
rrrr3s
���rc��tt�D]7}|jx}s�|j���#tj	|��9y�N)rr�_popen�poll�discard)�p�child_popens  rrr=s;��
�)�_���8�8�#�K�#��)9�)9�);�)G����a� �rc�N�eZdZdZd�Zddddifdd�d�Zd�Zd�Zd	�Zd
�Z	d�Z
dd�Zd
�Zd�Z
ed��Zej d��Zed��Zej d��Zed��Zej d��Zed��Zed��ZeZed��Zd�Zdd�Zed��Zy)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�6�|�Jd��tt�}tj|fz|_tjj�|_t
j�|_tj|_
d|_d|_||_
t|�|_t!|�|_|xs;t%|�j&dzdj)d�|jD��z|_|�||_t.j1|�y)Nz#group argument must be None for nowF�-�:c3�2K�|]}t|����y�wr)�str)�.0�is  r�	<genexpr>z'BaseProcess.__init__.<locals>.<genexpr>^s����=�n��c�!�f�n�s�)�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�targetr1�args�kwargsr �counts        r�__init__zBaseProcess.__init__Ps����}�C�C�C�}��%�&��)�3�3�u�h�>���'�/�/�4�4�6����9�9�;���,�1�1�������������4�[��
��F�|����>�T�$�Z�0�0�3�6��X�X�=�d�n�n�=�=�>��
��� �D�K��
�
�d�rc�2�|jrtd��y)Nzprocess object is closed)r3�
ValueErrorrs r�
_check_closedzBaseProcess._check_closedcs���<�<��7�8�8�rc�j�|jr'|j|ji|j��yy)zQ
        Method to be run in sub-process; can be overridden in sub-class
        N)r4r6r8rs r�runzBaseProcess.rungs+���<�<��D�L�L�$�*�*�5����5�rc��|j�|j�Jd��|jtj�k(sJd��t
jjd�rJd��t�|j|�|_|jj|_|`|`
|`tj!|�y)z%
        Start child process
        Nzcannot start a process twicez:can only start a process object created by current processr z3daemonic processes are not allowed to have children)rGrr0r.r/r	r,�getrr�sentinel�	_sentinelr4r6r8rr>rs r�startzBaseProcess.startns���	
�����{�{�"�B�$B�B�"����2�9�9�;�.�	L�K�	L�.�#�+�+�/�/��9�	E�D�	E�9��
��k�k�$�'������-�-���
�L�$�*�d�l��
�
�d�rc�X�|j�|jj�y)zT
        Terminate process; sends SIGTERM signal or uses TerminateProcess()
        N)rGr�	terminaters rrPzBaseProcess.terminate�s ��	
���������rc�X�|j�|jj�y)zT
        Terminate process; sends SIGKILL signal or uses TerminateProcess()
        N)rGr�killrs rrRzBaseProcess.kill�s ��	
���������rc��|j�|jtj�k(sJd��|j�Jd��|jj|�}|�tj|�yy)z5
        Wait until child process terminates
        zcan only join a child processNzcan only join a started process)rGr0r.r/r�waitrr)r�timeout�ress   rr;zBaseProcess.join�sr��	
�������2�9�9�;�.�O�0O�O�.��{�{�&�I�(I�I�&��k�k���w�'���?����d�#�rc��|j�|tury|jtj�k(sJd��|j
�y|j
j
�}|�ytj|�y)z1
        Return whether process is alive
        Tzcan only test a child processF)	rGr	r0r.r/rrrr)r�
returncodes  r�is_alivezBaseProcess.is_alive�su��	
�����#�#�����2�9�9�;�.�O�0O�O�.��;�;����[�[�%�%�'�
�������d�#�rc���|j�]|jj��td��|jj�d|_|`t
j
|�d|_y)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)rrrF�closerMrrr3rs rr[zBaseProcess.close�sg���;�;�"��{�{���!�)� �"P�Q�Q��K�K�����D�K������d�#���rc��|jSr)r<rs rr1zBaseProcess.name�s���z�z�rc�@�t|t�sJd��||_y)Nzname must be a string)�
isinstancer%r<)rr1s  rr1zBaseProcess.name�s���$��$�=�&=�=�$���
rc�:�|jjdd�S)z4
        Return whether process is a daemon
        r F)r,rKrs rr zBaseProcess.daemon�s��
�|�|����%�0�0rc�H�|j�Jd��||jd<y)z1
        Set whether process is a daemon
        Nzprocess has already startedr )rr,)r�daemonics  rr zBaseProcess.daemon�s(��
�{�{�"�A�$A�A�"�!)����X�rc� �|jdS)N�authkey)r,rs rrczBaseProcess.authkey�s���|�|�I�&�&rc�4�t|�|jd<y)z2
        Set authorization key of process
        rcN)�AuthenticationStringr,)rrcs  rrczBaseProcess.authkey�s��
#7�w�"?����Y�rc��|j�|j�|jS|jj�S)zM
        Return exit code of process or `None` if it has yet to stop
        )rGrrrs r�exitcodezBaseProcess.exitcode�s7��
	
�����;�;���;�;���{�{���!�!rc��|j�|turtj�S|jxr|jj
S)zU
        Return identifier (PID) of process or `None` if it has yet to start
        )rGr	r.r/r�pidrs r�identzBaseProcess.ident�s<��
	
�����#�#��9�9�;���;�;�2�4�;�;�?�?�2rc�n�|j�	|jS#t$r
td�d�wxYw)z{
        Return a file descriptor (Unix) or handle (Windows) suitable for
        waiting for process termination.
        zprocess not startedN)rGrM�AttributeErrorrFrs rrLzBaseProcess.sentinel�s<��	
����	>��>�>�!���	>��2�3��=�	>�s��4c��d}|turd}nc|jrd}nT|jtj�k7rd}n0|j
�d}n!|j
j
�}|�d}nd}t|�jd|jzg}|j
�(|jd|j
jz�|jd|jz�|j|�|�*tj||�}|jd	|z�|jr|jd
�ddj|�zS)
N�started�closed�unknown�initial�stoppedzname=%rzpid=%sz	parent=%szexitcode=%sr z<%s>� )r	r3r0r.r/rrr9r:r<�appendri�_exitcode_to_namerKr r;)rrg�status�infos    r�__repr__zBaseProcess.__repr__s�����#�#��F�
�\�\��F�
�
�
�����
,��F�
�[�[�
 ��F��{�{�'�'�)�H��#�"��"���T�
�#�#�Y����%;�<���;�;�"��K�K��4�;�;�?�?�2�3����K�$�"2�"2�2�3����F����(�,�,�X�x�@�H��K�K�
��0�1��;�;��K�K��!�������&�&rc��ddlm}m}	|j�|j	|j�tjd�at�a	|j�t}|at|j|j|�at j"r"t!j$�j'�	|j)�~|j+d�	|j-�d}|j/�	t!jF�|j+d|z�|jI�|S#~wxYw#|j/�wxYw#t0$rw}|j2�d}n^t5|j2t6�r
|j2}n7t8j:j=t?|j2�dz�d}Yd}~��d}~wd}ddl }t8j:j=d|jBz�|jE�Y��xYw#t!jF�|j+dz�|jI�wxYw)N�)�util�contextz child process calling self.run()r�
zProcess %s:
z process exiting with exitcode %d)%�r{r|�
_start_method�_force_start_method�	itertoolsrCr*�setr�_close_stdinr	�_ParentProcessr2r0r�	threading�_HAVE_THREAD_NATIVE_ID�main_thread�_set_native_id�_after_forkrwrI�_exit_function�
SystemExit�coder^�int�sys�stderr�writer%�	tracebackr1�	print_exc�	_shutdown�_flush_std_streams)r�parent_sentinelr{r|�old_processrg�er�s        r�
_bootstrapzBaseProcess._bootstrap"s���#�(	&��!�!�-��+�+�D�,>�,>�?�(���q�1����I�����*�K�#��,��!�!�4�#3�#3�_�F�O��/�/��%�%�'�6�6�8�
 �� � �"� ��I�I�8�9�
&����
����#�#�%�
���!��I�I�8�8�C�D��#�#�%����3 ���#�#�%���	��v�v�~����A�F�F�C�(��6�6���
�
� � ��Q�V�V��t�!3�4�����	"��H���J�J���_�t�y�y�8�9����!�����!��I�I�8�8�C�D��#�#�%�sb�B1E�<D<�E�E�1E�H�<D?�?E�E�E�	H� A-G�
H�AH�H�:Ic�d�ddlm}|jj�|j	�y)Nrz�r{)r~r{�_finalizer_registry�clear�_run_after_forkersr�s rr�zBaseProcess._after_forkRs#���� � �&�&�(����!rr)r:�
__module__�__qualname__�__doc__rrDrGrIrNrPrRr;rYr[�propertyr1�setterr rcrgrjrirLrxr��staticmethodr�r
rrrrGs4���
"�"�$�T��2����&9�6��$ ��	$��&�"����
�[�[�����1��1��]�]�*��*��'��'�
�^�^�@��@��"��"��3��3��C�
�	>��	>�'�>.�`�"��"rrc��eZdZd�Zy)rec�V�ddlm}|��td��tt	|�ffS)Nrz)�get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)r|r��	TypeErrorre�bytes)rr�s  r�
__reduce__zAuthenticationString.__reduce__^s3��/���'��2��
�$�e�D�k�^�3�3rN)r:r�r�r�r
rrrere]s��4rrec�4�eZdZd�Zd�Zed��Zdd�ZeZy)r�c�t�d|_||_||_d|_d|_d|_||_i|_y)Nr
F)r+r<�_pidr0rr3rMr,)rr1rirLs    rrDz_ParentProcess.__init__ns;�������
���	����������!�����rc�:�ddlm}||jgd��S)Nr�rT�rU��multiprocessing.connectionrTrM)rrTs  rrYz_ParentProcess.is_alivexs��3�����(�!�4�4�4rc��|jSr)r�rs rrjz_ParentProcess.ident|s���y�y�rNc�:�ddlm}||jg|��y)z6
        Wait until parent process terminates
        rr�r�Nr�)rrUrTs   rr;z_ParentProcess.join�s��	4��d�n�n�
�w�/rr)	r:r�r�rDrYr�rjr;rir
rrr�r�ls,���5�����0��Crr�c��eZdZd�Zd�Zy)�_MainProcessc��d|_d|_d|_d|_d|_tt
jd��dd�|_y)Nr
�MainProcessF� z/mp)rc�	semprefix)	r+r<r0rr3rer.�urandomr,rs rrDz_MainProcess.__init__�sB�����"��
����������#7��
�
�2��#G�%*�,��rc��yrr
rs rr[z_MainProcess.close�s��rN)r:r�r�rDr[r
rrr�r��s��,�$
rr�rz��SIG�_r")$�__all__r.r��signalr�r��_weakrefsetr�path�abspath�getcwd�ORIGINAL_DIR�OSErrorrrrr�objectrr�rer�r�rr	rCr*r�rrur�__dict__�itemsr1�signumr=r
rr�<module>r�s&����
�
�
������7�7�?�?�9�2�9�9�;�/�L����!�O"�&�O"�l4�5�4��[��B
�;�
�0���>��"�9�?�?�1�%���E�	��������.�.�0�1�L�D�&��B�Q�x���3�d�?�'(���Z��6�'�"�2�	�&�
�I�	��s���L��s�*C0�0C:�9C:

Hacked By AnonymousFox1.0, Coded By AnonymousFox