AlkantarClanX12

Your IP : 13.58.34.132


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



���]�#�@svdddgZddlZddlZddlZddlZddlmZyejjej	��Z
Wnek
r�dZ
YnXdd�Zdd�Z
dd	�ZGd
d�de�ZGdd�de�ZGd
d�de�Ze�aejd�ae�a[iZxPeejj��D]9\ZZedd�dkr,dekr,eee<q,We�ZdS)�BaseProcess�current_process�active_children�N)�WeakSetcCstS)N)�_current_process�rr�,/opt/alt/python35/lib64/python3.5/process.pyr#scCst�tt�S)N)�_cleanup�list�	_childrenrrrrr)scCs=x6tt�D](}|jj�dk	r
tj|�q
WdS)N)r
r�_popen�poll�discard)�prrrr	4sr	c	@sEeZdZdd�Zdddfidddd�Zdd�Zd	d
�Zdd�Zdd
d�Zdd�Z	e
dd��Zejdd��Ze
dd��Z
e
jdd��Z
e
dd��Zejdd��Ze
dd��Ze
dd��ZeZe
dd��Zd d!�Zd"d#�ZdS)$rcCs
t�dS)N)�NotImplementedError)�selfrrr�_PopenDszBaseProcess._PopenN�daemoncCs�tt�}tj|f|_tjj�|_tj�|_d|_	||_
t|�|_t
|�|_|p�t|�jddjdd�|jD��|_|dk	r�||_tj|�dS)N�-�:css|]}t|�VqdS)N)�str)�.0�irrr�	<genexpr>Ssz'BaseProcess.__init__.<locals>.<genexpr>)�next�_process_counterr�	_identity�_config�copy�os�getpid�_parent_pidr�_target�tuple�_args�dict�_kwargs�type�__name__�join�_namer�	_dangling�add)r�group�target�name�args�kwargsr�countrrr�__init__Gs		#	zBaseProcess.__init__cCs#|jr|j|j|j�dS)N)r"r$r&)rrrr�runXs	zBaseProcess.runcCsKt�|j|�|_|jj|_|`|`|`tj	|�dS)N)
r	rr�sentinel�	_sentinelr"r$r&rr,)rrrr�start_s
	zBaseProcess.startcCs|jj�dS)N)r�	terminate)rrrrr8pszBaseProcess.terminatecCs/|jj|�}|dk	r+tj|�dS)N)r�waitrr)r�timeout�resrrrr)vszBaseProcess.joincCs@|tkrdS|jdkr#dS|jj�|jjdkS)NTF)rrr
�
returncode)rrrr�is_alive�s
zBaseProcess.is_alivecCs|jS)N)r*)rrrrr/�szBaseProcess.namecCs
||_dS)N)r*)rr/rrrr/�scCs|jjdd�S)NrF)r�get)rrrrr�szBaseProcess.daemoncCs||jd<dS)Nr)r)r�daemonicrrrr�scCs|jdS)N�authkey)r)rrrrr@�szBaseProcess.authkeycCst|�|jd<dS)Nr@)�AuthenticationStringr)rr@rrrr@�scCs#|jdkr|jS|jj�S)N)rr
)rrrr�exitcode�szBaseProcess.exitcodecCs-|tkrtj�S|jo(|jjSdS)N)rrr r�pid)rrrr�ident�s
zBaseProcess.identcCs0y|jSWntk
r+td��YnXdS)Nzprocess not started)r6�AttributeError�
ValueError)rrrrr5�s
zBaseProcess.sentinelcCs�|tkrd}n]|jtj�kr3d}n?|jdkrKd}n'|jj�dk	rl|j}nd}t|�tkr�|dkr�d}ndt	j
||�}dt|�j|j||j
r�dp�d	fS)
N�started�unknown�initialr�stoppedzstopped[%s]z<%s(%s, %s%s)>z daemon�)rr!rr rr
rBr'�int�_exitcode_to_namer>r(r*r)r�statusrrr�__repr__�s				zBaseProcess.__repr__c Cs�ddlm}m}zgy�|jdk	r;|j|j�tjd�at�a	|j
�t}|az|jj
�|j�Wd~X|jd�z|j�d}Wd|j�XWn�tk
rA}zd|js�d}nMt|jdt�r|jd}n'tjjt|jd�d�d}WYdd}~Xn;d}ddl}tjjd|j�|j�YnXWd|jd|�tjj�tjj�X|S)N�)�util�contextz child process calling self.run()r�
zProcess %s:
z process exiting with exitcode %d)rKrQrR�
_start_method�_force_start_method�	itertoolsr2r�setr�_close_stdinr�_finalizer_registry�clear�_run_after_forkers�infor4�_exit_function�
SystemExitr0�
isinstancerL�sys�stderr�writer�	tracebackr/�	print_exc�stdout�flush)rrQrR�old_processrB�ercrrr�
_bootstrap�sD	




		!
zBaseProcess._bootstrap)r(�
__module__�__qualname__rr3r4r7r8r)r=�propertyr/�setterrr@rBrDrCr5rOrirrrrr>s(
	
c@seZdZdd�ZdS)rAcCs>ddlm}|�dkr+td��tt|�ffS)NrP)�get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)rRrn�	TypeErrorrA�bytes)rrnrrr�
__reduce__s
	zAuthenticationString.__reduce__N)r(rjrkrqrrrrrAsrAc@seZdZdd�ZdS)�_MainProcesscCsLf|_d|_d|_d|_dttjd��ddi|_dS)N�MainProcessr@� �	semprefixz/mp)rr*r!rrAr�urandomr)rrrrr3(s				z_MainProcess.__init__N)r(rjrkr3rrrrrr&srrrP�ZSIG�_) �__all__rr`�signalrV�_weakrefsetr�path�abspath�getcwd�ORIGINAL_DIR�OSErrorrrr	�objectrrprArrrr2rrWrrMr
�__dict__�itemsr/�signumr+rrrr�<module>
s0

�		""