%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.12/multiprocessing/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.12/multiprocessing/__pycache__/spawn.cpython-312.pyc

�

���f�%����ddlZddlZddlZddlZddlmZmZddlmZddlm	Z	ddlm
Z
gd�Zejdk7rd	Z
d	ZnAeed
d	�Z
ej xr)ej j#�j%d�Zd�Zd
�Zer-eej*j-ej.d��neej �d�Zd�Zd�Zdd�Zd�Zd�Zd�ZgZd�Z d�Z!d�Z"d�Z#y)�N�)�get_start_method�set_start_method)�process)�	reduction)�util)�_main�freeze_support�set_executable�get_executable�get_preparation_data�get_command_line�import_main_path�win32F�frozenzpythonservice.exec��|�|aytjdk(rtj|�aytj
|�ay)Nr)�_python_exe�sys�platform�os�fsdecode�fsencode)�exes �,/usr/lib/python3.12/multiprocessing/spawn.pyrr$s4��
�{���	����	 ��k�k�#�&���k�k�#�&��c��tS)N)r�rrrr-s���rz
python.exec�2�t|�dk\r	|ddk(ryy)z=
    Return whether commandline indicates we are forking
    �r�--multiprocessing-forkTF)�len)�argvs r�
is_forkingr#9s!���4�y�A�~�$�q�'�%=�=��rc��ttj�rgi}tjddD]/}|jd�\}}|dk(rd||<�"t	|�||<�1tdi|��tj�yy)zE
    Run code for process object if this in not the main process
    rN�=�Noner)r#rr"�split�int�
spawn_main�exit)�kwds�arg�name�values    rr
r
Csw���#�(�(�����8�8�A�B�<�	(�C��)�)�C�.�K�D�%����!��T�
� ��Z��T�
�	(�	��T�����
�rc�@�ttdd�r4tjdg|j�D�cgc]}d|z��	c}zSd}|dj	d�|j�D��z}tj�}t�}|g|zd|dgzScc}w)	zJ
    Returns prefix of command line used for spawning a child process
    rFr �%s=%rz<from multiprocessing.spawn import spawn_main; spawn_main(%s)z, c3�&K�|]	}d|z���y�w)r0Nr)�.0�items  r�	<genexpr>z#get_command_line.<locals>.<genexpr>\s����B�T�'�D�.�B�s�z-c)�getattrr�
executable�items�joinr�_args_from_interpreter_flagsr)r+r3�prog�optsrs     rrrSs����s�H�e�$����!9�:�,0�J�J�L�9�D��4��9�:�	;�N����	�	�B�T�Z�Z�\�B�B�B���0�0�2������u�t�|�t�T�+C�D�D�D��
:s�Bc���ttj�sJd��tjdk(rqddl}ddl}|�+|j
|j|jzd|�}nd}tj||��}|j|tj�}|}n.ddlm}	||	j _|}tj$|�}t'||�}
tj(|
�y)	z7
    Run code specified by data received over pipe
    zNot forkingrrNF)�source_processr)�resource_tracker)r#rr"r�msvcrt�_winapi�OpenProcess�SYNCHRONIZE�PROCESS_DUP_HANDLEr�	duplicate�open_osfhandler�O_RDONLY�r>�_resource_tracker�_fd�dupr	r*)�pipe_handle�
parent_pid�
tracker_fdr?r@r=�
new_handle�fd�parent_sentinelr>�exitcodes           rr)r)bs����c�h�h��.��.��
�|�|�w�����!�$�0�0��#�#�g�&@�&@�@��z�#�N�"�N��(�(��8F�H�
�
�
"�
"�:�r�{�{�
;��(��&�1;��*�*�.�
���&�&��-���R��)�H��H�H�X�rc��tj|dd��5}dtj�_	t
jj|�}t|�t
jj|�}tj�`	ddd�j|�S#tj�`wxYw#1swY�3xYw)N�rbT)�closefd)
r�fdopenr�current_process�_inheritingr�pickle�load�prepare�
_bootstrap)rOrP�from_parent�preparation_data�selfs     rr	r	~s���	���2�t�T�	*�6�k�04����!�-�	6�(�/�/�4�4�[�A���$�%��#�#�(�(��5�D��'�'�)�5�6��?�?�?�+�+���'�'�)�5��6�6�s#�C�A	B+�=C�+C�C�C
c�X�ttj�dd�rtd��y)NrWFa�
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.

        To fix this issue, refer to the "Safe importing of main module"
        section in https://docs.python.org/3/library/multiprocessing.html
        )r5rrV�RuntimeErrorrrr�_check_not_importing_mainra�s/���w�&�&�(�-��?���
�	
�@rc	���t�ttjt	j
�j��}tj�!tjj�|d<tjj�}	|jd�}tj||<|j||tj tjt#j$�t'���tj(d}t+|j,dd�}|�||d<|Stj.d	k7st0s�t2s�t+|d
d�}|�t"jj5|�s>tj�.t"jj7tj|�}t"jj9|�|d<|S#t$rY��;wxYw)zM
    Return info about parent needed by child to unpickle process object
    )�
log_to_stderr�authkeyN�	log_levelrG)r-�sys_path�sys_argv�orig_dir�dir�start_method�__main__r-�init_main_from_namer�__file__�init_main_from_path)ra�dictr�_log_to_stderrrrVrd�_logger�getEffectiveLevelr�path�copy�index�ORIGINAL_DIR�
ValueError�updater"r�getcwdr�modulesr5�__spec__r�WINEXE�
WINSERVICE�isabsr8�normpath)r-�drf�i�main_module�
main_mod_name�	main_paths       rr
r
�s�������)�)��'�'�)�1�1�	
�A�
�|�|�����7�7�9��+��
�X�X�]�]�_�H�+��N�N�2����*�*�����H�H�
������%�%��I�I�K�%�'�

�
��+�+�j�)�K��K�0�0�&�$�?�M�� �#0��
� �
�H�

����	 ��
��K��T�:�	�� ��G�G�M�M�)�,��,�,�8��G�G�L�L��)=�)=�y�I�	�')�w�w�'7�'7�	�'B�A�#�$��H��9�
��
�s�G%�%	G2�1G2c�*�d|vr|dtj�_d|vr|dtj�_d|vr|drt	j
�d|vr&t	j�j|d�d|vr|dt_	d|vr|dt_
d|vrtj|d�d|vr|dt_
d	|vrt|d	d
��d|vrt|d�yd
|vrt!|d
�yy)zE
    Try to get current process ready to unpickle process object
    r-rdrcrerfrgrirhrjT)�forcerlrnN)rrVr-rdrrc�
get_logger�setLevelrrsr"r�chdirrvr�_fixup_main_from_name�_fixup_main_from_path)�datas rrZrZ�s����~�)-�f�����!�&��D��,0��O����!�)��$��4��#8������d������"�"�4��#4�5��T���
�#����T���
�#�����}�
����e����T��#�J�/��������n�-�T�:���$��d�#8�9�:�	�$�	&��d�#8�9�:�
'rc��tjd}|dk(s|jd�ryt|jdd�|k(ryt
j
|�tjd�}tj|dd��}|jj|�|xtjd<tjd<y)Nrkz	.__main__r-�__mp_main__T)�run_name�	alter_sys)
rrz�endswithr5r{�old_main_modules�append�types�
ModuleType�runpy�
run_module�__dict__rx)�mod_name�current_mainr��main_contents    rr�r��s���
�;�;�z�*�L��:���!2�!2�;�!?���|�$�$�f�d�3�x�?��
���L�)��"�"�=�1�K��#�#�H�-:�.2�4�L�������-�;F�F�C�K�K�
��c�k�k�-�8rc���tjd}tjj	tjj|��d}|dk(ryt
|dd�|k(rytj|�tjd�}tj|d��}|jj|�|xtjd<tjd<y)Nrkr�ipythonrmr�)r�)rrzrrs�splitext�basenamer5r�r�r�r�r��run_pathr�rx)r�r��	main_namer�r�s     rr�r�s����;�;�z�*�L���� � ����!1�!1�)�!<�=�a�@�I��I����|�Z��.�)�;��
���L�)��"�"�=�1�K��>�>�)�+8�:�L�������-�;F�F�C�K�K�
��c�k�k�-�8rc��t|�y)z<
    Set sys.modules['__main__'] to module at main_path
    N)r�)r�s rrr/s���)�$r)NN)$rrr�r�rGrrr�contextrr�__all__rr|r}r5r6�lowerr�rrrsr8�exec_prefixr#r
rr)r	rar
r�rZr�r�rrrr�<module>r�s���
�
���0����K���<�<�7��
�F��J�
�S�(�E�
*�F����X�C�N�N�$8�$8�$:�$C�$C�DW�$X�J�'����2�7�7�<�<�����>�?��3�>�>�"��
� E��8	,�
�,,
�d��";�LG�2G�8%r

Zerion Mini Shell 1.0