AlkantarClanX12

Your IP : 18.119.133.206


Current Path : /opt/alt/python37/lib64/python3.7/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/multiprocessing/__pycache__/spawn.cpython-37.opt-2.pyc

B

YI~d�"�@s$ddlZddlZddlZddlZddlmZmZddlmZddlm	Z	ddlm
Z
ddd	d
ddd
gZejdkrzdZ
dZneedd�Z
ej���d�Zer�ej�ejd�anejadd	�Zdd
�Zdd�Zdd�Zdd�Zd&dd�Zdd�Zdd�Zdd�ZgZ dd �Z!d!d"�Z"d#d$�Z#d%d
�Z$dS)'�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.exez
python.execCs|adS)N)�_python_exe)Zexe�r�:/opt/alt/python37/lib64/python3.7/multiprocessing/spawn.pyr
)scCstS)N)rrrrrr-scCs$t|�dkr|ddkrdSdSdS)N�rz--multiprocessing-forkTF)�len)�argvrrr�
is_forking4srcCshttj�rdi}xBtjdd�D]0}|�d�\}}|dkrBd||<qt|�||<qWtf|�t��dS)Nr�=�None)r�sysr�split�int�
spawn_main�exit)�kwds�arg�name�valuerrrr	>s


cKshttdd�r(tjdgdd�|��D�Sd}|d�dd	�|��D��;}t��}tg|d
|dgSdS)NrFz--multiprocessing-forkcSsg|]}d|�qS)z%s=%rr)�.0�itemrrr�
<listcomp>Tsz$get_command_line.<locals>.<listcomp>z<from multiprocessing.spawn import spawn_main; spawn_main(%s)z, css|]}d|VqdS)z%s=%rNr)r#r$rrr�	<genexpr>Wsz#get_command_line.<locals>.<genexpr>z-c)�getattrr�
executable�items�joinrZ_args_from_interpreter_flagsr)r�progZoptsrrrr
NscCs\tjdkr.ddl}t�||�}|�|tj�}nddlm	}||j
_|}t|�}t�
|�dS)Nrrr)�semaphore_tracker)r�platform�msvcrtrZsteal_handleZopen_osfhandle�os�O_RDONLY�r,Z_semaphore_trackerZ_fdrr)Zpipe_handleZ
parent_pidZ
tracker_fdr.Z
new_handle�fdr,Zexitcoderrrr\s
rc	Cs^tj|ddd��@}dt��_z$tj�|�}t|�tj�|�}Wdt��`XWdQRX|�	�S)N�rbT)�closefd)
r/�fdopenr�current_process�_inheritingr�pickle�load�prepare�
_bootstrap)r2Zfrom_parentZpreparation_data�selfrrrrms
cCstt��dd�rtd��dS)Nr7Fa
        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.)r'rr6�RuntimeErrorrrrr�_check_not_importing_mainys
r>cCst�ttjt��jd�}tjdk	r2tj��|d<t	j
��}y|�d�}Wnt
k
r^YnXtj||<|j||t	jtjt��t�d�t	jd}t|jdd�}|dk	r�||d<nft	jdks�t�st�st|d	d�}|dk	�rtj
�|��s
tjdk	�r
tj
�tj|�}tj
�|�|d
<|S)N)�
log_to_stderr�authkey�	log_levelr1)r!�sys_path�sys_argv�orig_dir�dir�start_method�__main__r!�init_main_from_namer�__file__�init_main_from_path)r>�dictrZ_log_to_stderrrr6r@Z_loggerZgetEffectiveLevelr�path�copy�index�
ValueError�ORIGINAL_DIR�updaterr/�getcwdr�modulesr'�__spec__r-�WINEXE�
WINSERVICE�isabsr*�normpath)r!�drB�i�main_moduleZ
main_mod_name�	main_pathrrrr�s>






cCs�d|kr|dt��_d|kr,|dt��_d|krD|drDt��d|kr^t���|d�d|krp|dt_	d|kr�|dt_
d|kr�t�|d�d|kr�|dt_
d	|kr�t|d	d
d�d|kr�t|d�nd
|kr�t|d
�dS)Nr!r@r?rArBrCrErDrFT)�forcerHrJ)rr6r!r@rr?Z
get_loggerZsetLevelrrLrr/�chdirrPr�_fixup_main_from_name�_fixup_main_from_path)�datarrrr:�s,


r:cCs~tjd}|dks|�d�r dSt|jdd�|kr6dSt�|�t�d�}t	j
|ddd�}|j�|�|tjd<tjd<dS)NrGz	.__main__r!�__mp_main__T)�run_nameZ	alter_sys)
rrS�endswithr'rT�old_main_modules�append�types�
ModuleType�runpyZ
run_module�__dict__rQ)Zmod_name�current_mainr[�main_contentrrrr_�s


r_cCs�tjd}tj�tj�|��d}|dkr.dSt|dd�|krBdSt�|�t	�
d�}tj|dd�}|j
�|�|tjd<tjd<dS)NrGrZipythonrIrb)rc)rrSr/rL�splitext�basenamer'rerfrgrhriZrun_pathrjrQ)r\rkZ	main_namer[rlrrrr`�s


r`cCst|�dS)N)r`)r\rrrrs)NN)%r/rrirgr1rrr�contextrr�__all__r-rUrVr'r(�lowerrdrLr*�exec_prefixrr
rrr	r
rrr>rrer:r_r`rrrrr�<module>s>



2&