ok

Mini Shell

Direktori : /usr/lib64/python3.6/multiprocessing/__pycache__/
Upload File :
Current File : //usr/lib64/python3.6/multiprocessing/__pycache__/process.cpython-36.opt-2.pyc

3


 \�#�@sdddgZddlZddlZddlZddlZddlmZyejjej	��Z
Wnek
rbdZ
YnXdd�Zdd�Z
dd	�ZGd
d�de�ZGdd�de�ZGd
d�de�Ze�aejd�ae�a[iZx<eejj��D]*\ZZedd�dko�dekr�eee<q�We�ZdS)�BaseProcess�current_process�active_children�N)�WeakSetcCstS)N)�_current_process�rr�//usr/lib64/python3.6/multiprocessing/process.pyr#scCst�tt�S)N)�_cleanup�list�	_childrenrrrrr)scCs.x(tt�D]}|jj�dk	r
tj|�q
WdS)N)r
r�_popen�poll�discard)�prrrr	4sr	c@s�eZdZdd�Zdddfifdd�dd�Zdd�Zd	d
�Zdd�Zd$d
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)%rcCst�dS)N)�NotImplementedError)�selfrrr�_PopenDszBaseProcess._PopenN)�daemoncCs�tt�}tj|f|_tjj�|_tj�|_d|_	||_
t|�|_t
|�|_|prt|�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�runXszBaseProcess.runcCs6t�|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	rtj|�dS)N)r�waitrr)rZtimeout�resrrrr)vszBaseProcess.joincCsB|tkrdS|jdkrdS|jj�}|dkr0dStj|�dSdS)NTF)rrr
rr)r�
returncoderrr�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)rZdaemonicrrrr�scCs
|jdS)N�authkey)r)rrrrr>�szBaseProcess.authkeycCst|�|jd<dS)Nr>)�AuthenticationStringr)rr>rrrr>�scCs|jdkr|jS|jj�S)N)rr
)rrrr�exitcode�s
zBaseProcess.exitcodecCs"|tkrtj�S|jo|jjSdS)N)rrr r�pid)rrrr�ident�szBaseProcess.identcCs(y|jStk
r"td��YnXdS)Nzprocess not started)r6�AttributeError�
ValueError)rrrrr5�szBaseProcess.sentinelcCs�|tkrd}n>|jtj�kr"d}n*|jdkr2d}n|jj�dk	rH|j}nd}t|�tkrv|dkrfd}ndt	j
||�}dt|�j|j||j
r�dp�d	fS)
NZstarted�unknown�initialrZstoppedzstopped[%s]z<%s(%s, %s%s)>z daemon�)rr!rr rr
r@r'�int�_exitcode_to_namer=r(r*r)rZstatusrrr�__repr__�s
zBaseProcess.__repr__c CsJddlm}m}�zy||jdk	r,|j|j�tjd�at�a	|j
�t}|az|jj
�|j�Wd~X|jd�z|j�d}Wd|j�XWn�tk
r�}zL|js�d}n:t|jdt�r�|jd}ntjjt|jd�d�d}WYdd}~Xn2d}ddl}tjjd|j�|j�YnXWd|jd|�|j�X|S)N�)�util�contextz child process calling self.run()r�
zProcess %s:
z process exiting with exitcode %d)rGrLrMZ
_start_methodZ_force_start_method�	itertoolsr2r�setrZ_close_stdinrZ_finalizer_registry�clearZ_run_after_forkers�infor4Z_exit_function�
SystemExitr0�
isinstancerH�sys�stderr�writer�	tracebackr/�	print_excZ_flush_std_streams)rrLrMZold_processr@�erXrrr�
_bootstrap�sB




zBaseProcess._bootstrap)N)r(�
__module__�__qualname__rr3r4r7r8r)r<�propertyr/�setterrr>r@rBrAr5rJr[rrrrr>s(

	
c@seZdZdd�ZdS)r?cCs,ddlm}|�dkrtd��tt|�ffS)NrK)�get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)rMr`�	TypeErrorr?�bytes)rr`rrr�
__reduce__s

zAuthenticationString.__reduce__N)r(r\r]rcrrrrr?sr?c@seZdZdd�ZdS)�_MainProcesscCs2f|_d|_d|_d|_ttjd��dd�|_dS)NZMainProcess� z/mp)r>Z	semprefix)rr*r!rr?r�urandomr)rrrrr3-sz_MainProcess.__init__N)r(r\r]r3rrrrrd+srdrK�ZSIG�_) �__all__rrU�signalrO�_weakrefsetr�path�abspath�getcwdZORIGINAL_DIR�OSErrorrrr	�objectrrbr?rdrr2rrPrrIr
�__dict__�itemsr/Zsignumr+rrrr�<module>
s2


`


Zerion Mini Shell 1.0