AlkantarClanX12

Your IP : 18.191.200.47


Current Path : /proc/self/root/opt/alt/python39/lib64/python3.9/multiprocessing/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python39/lib64/python3.9/multiprocessing/__pycache__/spawn.cpython-39.pyc

a

R�fP$�@sddlZddlZddlZddlZddlmZmZddlmZddlm	Z	ddlm
Z
gd�Zejdkrpd	Z
d	Zneed
d	�Z
ej���d�Zer�ej�ejd�anejad
d�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/python39/lib64/python3.9/multiprocessing/spawn.pyr
)sr
cCstSrrrrrrr-srcCs$t|�dkr|ddkrdSdSdS)z=
    Return whether commandline indicates we are forking
    �r�--multiprocessing-forkTFN)�len)�argvrrr�
is_forking4srcCshttj�rdi}tjdd�D]0}|�d�\}}|dkr@d||<qt|�||<qtfi|��t��dS)zE
    Run code for process object if this in not the main process
    rN�=�None)r�sysr�split�int�
spawn_main�exit)�kwds�arg�name�valuerrrr	>s

r	cKshttdd�r(tjdgdd�|��D�Sd}|d�dd	�|��D��;}t��}tg|d
|dgSdS)zJ
    Returns prefix of command line used for spawning a child process
    rFrcSsg|]}d|�qS)�%s=%rr��.0�itemrrr�
<listcomp>T�z$get_command_line.<locals>.<listcomp>z<from multiprocessing.spawn import spawn_main; spawn_main(%s)z, css|]}d|VqdS)r&Nrr'rrr�	<genexpr>Wr+z#get_command_line.<locals>.<genexpr>z-cN)�getattrr�
executable�items�joinrZ_args_from_interpreter_flagsr)r"�progZoptsrrrr
Ns�r
cCs�ttj�sJd��tjdkrrddl}ddl}|durL|�|j|jBd|�}nd}t	j
||d�}|�|tj
�}|}n"ddlm}	||	j_|}t�|�}t||�}
t�|
�dS)	z7
    Run code specified by data received over pipe
    zNot forkingrrNF)�source_processr)�resource_tracker)rrr�platform�msvcrt�_winapiZOpenProcessZSYNCHRONIZEZPROCESS_DUP_HANDLErZ	duplicateZopen_osfhandle�os�O_RDONLY�r3Z_resource_trackerZ_fd�duprr!)Zpipe_handleZ
parent_pidZ
tracker_fdr5r6r2Z
new_handle�fd�parent_sentinelr3Zexitcoderrrr \s*

��

r c	Cs|tj|ddd��R}dt��_z,tj�|�}t|�tj�|�}Wt��`n
t��`0Wd�n1sh0Y|�	|�S)N�rbT)�closefd)
r7�fdopenr�current_process�_inheritingr�pickle�load�prepare�
_bootstrap)r;r<Zfrom_parentZpreparation_data�selfrrrrxs
2rcCstt��dd�rtd��dS)NrAFa
        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-rr@�RuntimeErrorrrrr�_check_not_importing_main�srHcCst�ttjt��jd�}tjdur2tj��|d<t	j
��}z|�d�}Wnt
y\Yn0tj||<|j||t	jtjt��t�d�t	jd}t|jdd�}|dur�||d<nft	jd	ks�t�st�st|d
d�}|du�rtj
�|��stjdu�rtj
�tj|�}tj
�|�|d<|S)zM
    Return info about parent needed by child to unpickle process object
    )�
log_to_stderr�authkeyN�	log_levelr9)r$�sys_path�sys_argv�orig_dir�dir�start_method�__main__r$�init_main_from_namer�__file__�init_main_from_path)rH�dictrZ_log_to_stderrrr@rJZ_loggerZgetEffectiveLevelr�path�copy�index�
ValueError�ORIGINAL_DIR�updaterr7�getcwdr�modulesr-�__spec__r4�WINEXE�
WINSERVICE�isabsr0�normpath)r$�drL�i�main_moduleZ
main_mod_name�	main_pathrrrr�sD�


�


�rcCs�d|vr|dt��_d|vr,|dt��_d|vrD|drDt��d|vr^t���|d�d|vrp|dt_	d|vr�|dt_
d|vr�t�|d�d|vr�|dt_
d	|vr�t|d	d
d�d|vr�t|d�nd
|vr�t|d
�dS)zE
    Try to get current process ready to unpickle process object
    r$rJrIrKrLrMrOrNrPT)ZforcerRrTN)rr@r$rJrrIZ
get_loggerZsetLevelrrVrr7�chdirrZr�_fixup_main_from_name�_fixup_main_from_path)�datarrrrD�s,


rDcCs~tjd}|dks|�d�r dSt|jdd�|kr6dSt�|�t�d�}t	j
|ddd�}|j�|�|tjd<tjd<dS)NrQz	.__main__r$�__mp_main__T)�run_nameZ	alter_sys)
rr]�endswithr-r^�old_main_modules�append�types�
ModuleType�runpyZ
run_module�__dict__r[)Zmod_name�current_mainre�main_contentrrrrh�s


�rhcCs�tjd}tj�tj�|��d}|dkr.dSt|dd�|krBdSt�|�t	�
d�}tj|dd�}|j
�|�|tjd<tjd<dS)NrQrZipythonrSrk)rl)rr]r7rV�splitext�basenamer-rnrorprqrrZrun_pathrsr[)rfrtZ	main_namererurrrri	s


�ricCst|�dS)z<
    Set sys.modules['__main__'] to module at main_path
    N)ri)rfrrrr%sr)NN)%r7rrrrpr9rrr�contextrr�__all__r4r_r`r-r.�lowerrmrVr0�exec_prefixrr
rrr	r
r rrHrrnrDrhrirrrrr�<module>s<


2&