MINI MINI MANI MO

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

3


 \#@sdddgZddlZddlZddlZddlZddlmZyejjej	Z
Wnek
rbdZ
YnXddZddZ
dd	ZGd
ddeZGdddeZGd
ddeZeaejdaea[iZx<eejjD]*\ZZedddkodekreee<qWeZdS)BaseProcesscurrent_processactive_childrenN)WeakSetcCstS)N)_current_processrr//usr/lib64/python3.6/multiprocessing/process.pyr#scCstttS)N)_cleanuplist	_childrenrrrrr)scCs.x(ttD]}|jjdk	r
tj|q
WdS)N)r
r_popenpolldiscard)prrrr	4sr	c@seZdZddZdddfifddddZddZd	d
ZddZd$d
dZddZ	e
ddZejddZe
ddZ
e
jddZ
e
ddZejddZe
ddZe
ddZeZe
ddZd d!Zd"d#ZdS)%rcCstdS)N)NotImplementedError)selfrrr_PopenDszBaseProcess._PopenN)daemoncCstt}tj|f|_tjj|_tj|_d|_	||_
t||_t
||_|prt|jddjdd|jD|_|dk	r||_tj|dS)N-:css|]}t|VqdS)N)str).0irrr	<genexpr>Ssz'BaseProcess.__init__.<locals>.<genexpr>)next_process_counterr	_identity_configcopyosgetpid_parent_pidr_targettuple_argsdict_kwargstype__name__join_namer	_danglingadd)rgrouptargetnameargskwargsrcountrrr__init__Gs


zBaseProcess.__init__cCs|jr|j|j|jdS)N)r"r$r&)rrrrrunXszBaseProcess.runcCs6t|j||_|jj|_|`|`|`tj	|dS)N)
r	rrsentinel	_sentinelr"r$r&rr,)rrrrstart_s
	
zBaseProcess.startcCs|jjdS)N)r	terminate)rrrrr8pszBaseProcess.terminatecCs"|jj|}|dk	rtj|dS)N)rwaitrr)rZtimeoutresrrrr)vszBaseProcess.joincCsB|tkrdS|jdkrdS|jj}|dkr0dStj|dSdS)NTF)rrr
rr)r
returncoderrris_alives


zBaseProcess.is_alivecCs|jS)N)r*)rrrrr/szBaseProcess.namecCs
||_dS)N)r*)rr/rrrr/scCs|jjddS)NrF)rget)rrrrrszBaseProcess.daemoncCs||jd<dS)Nr)r)rZdaemonicrrrrscCs
|jdS)Nauthkey)r)rrrrr>szBaseProcess.authkeycCst||jd<dS)Nr>)AuthenticationStringr)rr>rrrr>scCs|jdkr|jS|jjS)N)rr
)rrrrexitcodes
zBaseProcess.exitcodecCs"|tkrtjS|jo|jjSdS)N)rrr rpid)rrrridentszBaseProcess.identcCs(y|jStk
r"tdYnXdS)Nzprocess not started)r6AttributeError
ValueError)rrrrr5szBaseProcess.sentinelcCs|tkrd}n>|jtjkr"d}n*|jdkr2d}n|jjdk	rH|j}nd}t|tkrv|dkrfd}ndt	j
||}dt|j|j||j
rdpd	fS)
NZstartedunknowninitialrZstoppedzstopped[%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|jtjdata	|j
t}|az|jj
|jWd~X|jdz|jd}Wd|jXWntk
r}zL|jsd}n:t|jdtr|jd}ntjjt|jddd}WYdd}~Xn2d}ddl}tjjd|j|jYnXWd|jd||jX|S)N)utilcontextz child process calling self.run()r
zProcess %s:
z process exiting with exitcode %d)rGrLrMZ
_start_methodZ_force_start_method	itertoolsr2rsetrZ_close_stdinrZ_finalizer_registryclearZ_run_after_forkersinfor4Z_exit_function
SystemExitr0
isinstancerHsysstderrwriter	tracebackr/	print_excZ_flush_std_streams)rrLrMZold_processr@erXrrr
_bootstrapsB


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

	
c@seZdZddZdS)r?cCs,ddlm}|dkrtdtt|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@seZdZddZdS)_MainProcesscCs2f|_d|_d|_d|_ttjddd|_dS)NZMainProcess z/mp)r>Z	semprefix)rr*r!rr?rurandomr)rrrrr3-sz_MainProcess.__init__N)r(r\r]r3rrrrrd+srdrKZSIG_) __all__rrUsignalrO_weakrefsetrpathabspathgetcwdZORIGINAL_DIROSErrorrrr	objectrrbr?rdrr2rrPrrIr
__dict__itemsr/Zsignumr+rrrr<module>
s2


`


OHA YOOOO