Your IP : 3.15.10.139


Current Path : /opt/alt/python35/lib64/python3.5/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/multiprocessing/__pycache__/spawn.cpython-35.opt-2.pyc



���]�"�@s�ddlZddlZddlZddlZddlZddlmZmZddlmZddlm	Z	dddd	d
ddgZ
ejd
kr�dZdZ
n9ejd
ko�eedd�Zejj�jd�Z
e
rejjejd�an	ejadd�Zdd	�Zdd�Zdd�Zdd�Zdddd�Zdd�Zdd�Zdd
�ZgZdd�Z d d!�Z!d"d#�Z"d$d�Z#dS)%�N�)�get_start_method�set_start_method)�process)�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/python35/lib64/python3.5/spawn.pyr	)scCstS)N)rrrrrr
-scCs.t|�dkr&|ddkr&dSdSdS)N�rz--multiprocessing-forkTF)�len)�argvrrr�
is_forking4s"rcCs�ttj�r�i}xYtjdd�D]D}|jd�\}}|dkr]d||<q)t|�||<q)Wt|�tj�dS)Nr�=�None)r�sysr�split�int�
spawn_main�exit)�kwds�arg�name�valuerrrr>s

cKs�ttdd�r6tjdgdd�|j�D�Sd}|djdd	�|j�D��;}tj�}tg|d
|dgSdS)NrFz--multiprocessing-forkcSsg|]}d|�qS)z%s=%rr)�.0�itemrrr�
<listcomp>Ts	z$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�joinr�_args_from_interpreter_flagsr)r�progZoptsrrrrNs&c	Cs�tjdkrRddl}ddlm}|||�}|j|tj�}n"ddlm	}||j
_|}t|�}tj
|�dS)Nrrr)�steal_handle)�semaphore_tracker)r�platform�msvcrt�	reductionr,�open_osfhandle�os�O_RDONLY�r-Z_semaphore_trackerZ_fdrr)	Zpipe_handleZ
parent_pidZ
tracker_fdr/r,Z
new_handle�fdr-�exitcoderrrr\srcCswtj|ddd��R}dtj�_z,tj|�}t|�tj|�}Wdtj�`XWdQRX|j�S)N�rb�closefdT)	r2�fdopenr�current_process�_inheriting�pickle�load�prepare�
_bootstrap)r5Zfrom_parentZpreparation_data�selfrrrrns
cCs(ttj�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_mainzs
rBcCs�t�tdtjdtj�j�}tjdk	rJtjj�|d<t	j
j�}y|jd�}Wnt
k
r�YnXtj||<|jd|d|dt	jdtjd	tj�d
t��t	jd}t|jdd�}|dk	r||d<n�t	jd
ks#tr�tr�t|dd�}|dk	r�tj
j|�r{tjdk	r{tj
jtj|�}tj
j|�|d<|S)N�
log_to_stderr�authkey�	log_levelr4r �sys_path�sys_argv�orig_dir�dir�start_method�__main__�init_main_from_namer�__file__�init_main_from_path)rB�dictr�_log_to_stderrrr:rD�_logger�getEffectiveLevelr�path�copy�index�
ValueError�ORIGINAL_DIR�updaterr2�getcwdr�modulesr&�__spec__r.�WINEXE�
WINSERVICE�isabsr)�normpath)r �drF�i�main_moduleZ
main_mod_name�	main_pathrrrr�s>	

			


cCsDd|kr|dtj�_d|kr>|dtj�_d|kr^|dr^tj�d|kr�tj�j|d�d|kr�|dt_	d|kr�|dt_
d|kr�tj|d�d|kr�|dt_
d	|kr	t|d	d
d�d|kr&t|d�nd
|kr@t|d
�dS)Nr rDrCrErFrGrIrHrJ�forceTrLrN)rr:r rDrrC�
get_logger�setLevelrrSrr2�chdirrWr�_fixup_main_from_name�_fixup_main_from_path)�datarrrr>�s,



r>cCs�tjd}|dks(|jd�r,dSt|jdd�|krKdStj|�tjd�}t	j
|dddd�}|jj|�|tjd<tjd<dS)NrKz	.__main__r �__mp_main__�run_nameZ	alter_sysT)
rrZ�endswithr&r[�old_main_modules�append�types�
ModuleType�runpyZ
run_module�__dict__rX)Zmod_name�current_mainrb�main_contentrrrrh�s

	rhcCs�tjd}tjjtjj|��d}|dkr?dSt|dd�|kr[dStj|�t	j
d�}tj|dd�}|j
j|�|tjd<tjd<dS)NrKrZipythonrMrkrl)rrZr2rS�splitext�basenamer&rnrorprqrrZrun_pathrsrX)rcrtZ	main_namerbrurrrri�s
"
	ricCst|�dS)N)ri)rcrrrr
s)$r2r<rrrrpr4rrrr�__all__r.r\r]r&r'�lowerrmrSr)�exec_prefixrr	r
rrrrrrBrrnr>rhrir
rrrr�<module>s>	!	
2&

?>