AlkantarClanX12

Your IP : 18.227.114.218


Current Path : /opt/alt/python310/lib64/python3.10/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/multiprocessing/__pycache__/spawn.cpython-310.opt-1.pyc

o

6��fP$�@sddlZddlZddlZddlZddlmZmZddlmZddlm	Z	ddlm
Z
gd�Zejdkr8d	Z
d	Zneed
d	�Z
ej���d�ZerQej�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/python310/lib64/python3.10/multiprocessing/spawn.pyr
)sr
cCstSrrrrrrr-srcCs t|�dkr|ddkrdSdS)z=
    Return whether commandline indicates we are forking
    �r�--multiprocessing-forkTF)�len)�argvrrr�
is_forking4srcCslttj�r4i}tjdd�D]}|�d�\}}|dkr d||<qt|�||<qtdi|��t��dSdS)zE
    Run code for process object if this in not the main process
    rN�=�Noner)r�sysr�split�int�
spawn_main�exit)�kwds�arg�name�valuerrrr	>s

�r	cKsdttdd�rtjdgdd�|��D�Sd}|d�dd	�|��D��;}t��}tg|d
|dgS)zJ
    Returns prefix of command line used for spawning a child process
    rFrcSsg|]}d|�qS)�%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)r&Nrr'rrr�	<genexpr>Ws�z#get_command_line.<locals>.<genexpr>z-c)�getattrr�
executable�items�joinrZ_args_from_interpreter_flagsr)r"�progZoptsrrrr
Ns�r
cCs�tjdkr0ddl}ddl}|dur|�|j|jBd|�}nd}tj||d�}|�	|t
j�}|}nddlm
}	||	j_|}t
�|�}t||�}
t�|
�dS)z7
    Run code specified by data received over pipe
    rrNF)�source_processr)�resource_tracker)r�platform�msvcrt�_winapiZOpenProcessZSYNCHRONIZEZPROCESS_DUP_HANDLErZ	duplicateZopen_osfhandle�os�O_RDONLY�r2Z_resource_trackerZ_fd�duprr!)Zpipe_handleZ
parent_pidZ
tracker_fdr4r5r1Z
new_handle�fd�parent_sentinelr2Zexitcoderrrr \s(

��

r c	Cs|tj|ddd��)}dt��_ztj�|�}t|�tj�|�}Wt��`nt��`wWd�n1s4wY|�	|�S)N�rbT)�closefd)
r6�fdopenr�current_process�_inheritingr�pickle�load�prepare�
_bootstrap)r:r;Zfrom_parentZpreparation_data�selfrrrrxs
�
rcCstt��dd�rtd��dS)Nr@Fa
        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�s�rGcCst�ttjt��jd�}tjdurtj��|d<t	j
��}z|�d�}Wn	t
y.Ynwtj||<|j||t	jtjt��t�d�t	jd}t|jdd�}|durZ||d<|St	jd	kscts�ts�t|d
d�}|dur�tj
�|�s�tjdur�tj
�tj|�}tj
�|�|d<|S)zM
    Return info about parent needed by child to unpickle process object
    )�
log_to_stderr�authkeyN�	log_levelr8)r$�sys_path�sys_argv�orig_dir�dir�start_method�__main__r$�init_main_from_namer�__file__�init_main_from_path)rG�dictrZ_log_to_stderrrr?rIZ_loggerZgetEffectiveLevelr�path�copy�index�
ValueError�ORIGINAL_DIR�updaterr6�getcwdr�modulesr,�__spec__r3�WINEXE�
WINSERVICE�isabsr/�normpath)r$�drK�i�main_moduleZ
main_mod_name�	main_pathrrrr�sF�

�
�
	�
rcCs�d|vr|dt��_d|vr|dt��_d|vr"|dr"t��d|vr/t���|d�d|vr8|dt_	d|vrA|dt_
d|vrLt�|d�d|vrU|dt_
d	|vrat|d	d
d�d|vrmt|d�dSd
|vryt|d
�dSdS)zE
    Try to get current process ready to unpickle process object
    r$rIrHrJrKrLrNrMrOT)ZforcerQrSN)rr?r$rIrrHZ
get_loggerZsetLevelrrUrr6�chdirrYr�_fixup_main_from_name�_fixup_main_from_path)�datarrrrC�s.


�rCcCs~tjd}|dks|�d�rdSt|jdd�|krdSt�|�t�d�}t	j
|ddd�}|j�|�|tjd<tjd<dS)NrPz	.__main__r$�__mp_main__T)�run_nameZ	alter_sys)
rr\�endswithr,r]�old_main_modules�append�types�
ModuleType�runpyZ
run_module�__dict__rZ)Zmod_name�current_mainrd�main_contentrrrrg�s


�rgcCs�tjd}tj�tj�|��d}|dkrdSt|dd�|kr!dSt�|�t	�
d�}tj|dd�}|j
�|�|tjd<tjd<dS)NrPrZipythonrRrj)rk)rr\r6rU�splitext�basenamer,rmrnrorprqZrun_pathrrrZ)rersZ	main_namerdrtrrrrh	s


�rhcCst|�dS)z<
    Set sys.modules['__main__'] to module at main_path
    N)rh)rerrrr%sr)NN)%r6rrqror8rrr�contextrr�__all__r3r^r_r,r-�lowerrlrUr/�exec_prefixrr
rrr	r
r rrGrrmrCrgrhrrrrr�<module>s>



2&