File "process.cpython-39.opt-1.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python39/lib64/python3.9/multiprocessing/__pycache__/process.cpython-39.opt-1.pyc
File size: 10.17 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

a

XC?h.@s2gdZddlZddlZddlZddlZddlZddlmZzej	e
ZWneyfdZYn0ddZ
ddZdd	Zd
dZGdd
d
eZGdddeZGdddeZGdddeZdaeaedaea[iZeej D]0\Z!Z"e!dddkrde!vrde!ee"<qeZ#dS))BaseProcesscurrent_processactive_childrenparent_processN)WeakSetcCstS)z@
    Return process object representing the current process
    )_current_processrr</opt/alt/python39/lib64/python3.9/multiprocessing/process.pyr%srcCstttS)zN
    Return list of process objects corresponding to live child processes
    )_cleanuplist	_childrenrrrr	r+srcCstS)z?
    Return process object representing the parent process
    )_parent_processrrrr	r3srcCs*ttD]}|jdurt|qdSN)rr_popenpolldiscard)prrr	r
=sr
c@seZdZdZddZddddifddddZd	d
ZddZd
dZddZ	ddZ
d,ddZddZddZ
eddZejddZeddZejddZedd Zejd!d Zed"d#Zed$d%ZeZed&d'Zd(d)Zd-d*d+ZdS).rz
    Process objects represent activity that is run in a separate process

    The class is analogous to `threading.Thread`
    cCstdSr)NotImplementedErrorselfrrr	_PopenMszBaseProcess._PopenNr)daemoncCstt}tj|f|_tj|_t|_tj	|_
d|_d|_||_
t||_t||_|pt|jdddd|jD|_|dur||_t|dS)NF-:css|]}t|VqdSr)str).0irrr		<genexpr>^z'BaseProcess.__init__.<locals>.<genexpr>)next_process_counterr	_identity_configcopyosgetpid_parent_pidname_parent_namer_closed_targettuple_argsdict_kwargstype__name__join_namer	_danglingadd)rgrouptargetr'argskwargsrcountrrr	__init__Ps 


zBaseProcess.__init__cCs|jrtddS)Nzprocess object is closed)r)
ValueErrorrrrr	
_check_closedcszBaseProcess._check_closedcCs|jr|j|ji|jdS)zQ
        Method to be run in sub-process; can be overridden in sub-class
        N)r*r,r.rrrr	rungszBaseProcess.runcCs>|t|||_|jj|_|`|`|`t	
|dS)z%
        Start child process
        N)r<r
rrsentinel	_sentinelr*r,r.rr4rrrr	startns
zBaseProcess.startcCs||jdS)zT
        Terminate process; sends SIGTERM signal or uses TerminateProcess()
        N)r<r	terminaterrrr	rAszBaseProcess.terminatecCs||jdS)zT
        Terminate process; sends SIGKILL signal or uses TerminateProcess()
        N)r<rkillrrrr	rBszBaseProcess.killcCs*||j|}|dur&t|dS)z5
        Wait until child process terminates
        N)r<rwaitrr)rtimeoutresrrr	r1szBaseProcess.joincCsJ||turdS|jdur"dS|j}|dur8dSt|dSdS)z1
        Return whether process is alive
        TNF)r<rrrrr)r
returncoderrr	is_alives


zBaseProcess.is_alivecCsH|jdur>|jdur td|jd|_|`t|d|_dS)z
        Close the Process object.

        This method releases resources held by the Process object.  It is
        an error to call this method if the child process is still running.
        Nz^Cannot close a process while it is still running. You should first call join() or terminate().T)rrr;closer?rrr)rrrr	rHs


zBaseProcess.closecCs|jSrr2rrrr	r'szBaseProcess.namecCs
||_dSrrI)rr'rrr	r'scCs|jddS)z4
        Return whether process is a daemon
        rF)r"getrrrr	rszBaseProcess.daemoncCs||jd<dS)z1
        Set whether process is a daemon
        rNr")rZdaemonicrrr	rscCs
|jdS)NauthkeyrKrrrr	rLszBaseProcess.authkeycCst||jd<dS)z2
        Set authorization key of process
        rLN)AuthenticationStringr")rrLrrr	rLscCs"||jdur|jS|jS)zM
        Return exit code of process or `None` if it has yet to stop
        N)r<rrrrrr	exitcodes
zBaseProcess.exitcodecCs*||turtS|jo$|jjSdS)zU
        Return identifier (PID) of process or `None` if it has yet to start
        N)r<rr$r%rpidrrrr	identszBaseProcess.identcCs2|z|jWSty,tddYn0dS)z{
        Return a file descriptor (Unix) or handle (Windows) suitable for
        waiting for process termination.
        zprocess not startedN)r<r?AttributeErrorr;rrrr	r>s
zBaseProcess.sentinelcCsd}|turd}nL|jrd}n@|jtkr2d}n,|jdurBd}n|j}|durZd}nd}t|jd|j	g}|jdur|
d|jj|
d|j|
||durt
||}|
d	||jr|
d
dd|S)
NZstartedclosedunknowninitialZstoppedzname=%rzpid=%sz	parent=%szexitcode=%srz<%s> )rr)r&r$r%rrr/r0r2appendrO_exitcode_to_namerJrr1)rrNZstatusinforrr	__repr__s0




zBaseProcess.__repr__c
Csddlm}m}z`z|jdur,||jtdata	|
t}|at|j
|j|atjrntz|j|W~n~0|dz|d}W|n
|0Wnty }zJ|jdurd}n.t|jtr|j}ntj t!|jdd}WYd}~n:d}~0d}ddl"}tj d|j#|$Yn0Wt%|d||&n t%|d||&0|S)N)utilcontextz child process calling self.run()r
zProcess %s:
z process exiting with exitcode %d)'r[r\Z
_start_methodZ_force_start_method	itertoolsr9r setrZ_close_stdinr_ParentProcessr(r&r
	threadingZ_HAVE_THREAD_NATIVE_IDZmain_threadZ_set_native_idZ_finalizer_registryclearZ_run_after_forkersrXr=Z_exit_function
SystemExitcode
isinstanceintsysstderrwriter	tracebackr'	print_excZ	_shutdownZ_flush_std_streams)rZparent_sentinelr[r\Zold_processrNerkrrr	
_bootstrap"sT








zBaseProcess._bootstrap)N)N)r0
__module____qualname____doc__rr:r<r=r@rArBr1rGrHpropertyr'setterrrLrNrPrOr>rYrnrrrr	rGsD







	


rc@seZdZddZdS)rMcCs,ddlm}|durtdtt|ffS)NrZ)get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)r\rt	TypeErrorrMbytes)rrtrrr	
__reduce__Xs
zAuthenticationString.__reduce__N)r0rorprwrrrr	rMWsrMc@s6eZdZddZddZeddZd
dd	ZeZdS)racCs4d|_||_||_d|_d|_d|_||_i|_dS)NrF)r!r2_pidr&rr)r?r")rr'rOr>rrr	r:hsz_ParentProcess.__init__cCsddlm}||jgddS)NrrCrDZmultiprocessing.connectionrCr?)rrCrrr	rGrsz_ParentProcess.is_alivecCs|jSr)rxrrrr	rPvsz_ParentProcess.identNcCs ddlm}||jg|ddS)z6
        Wait until parent process terminates
        rryrzNr{)rrDrCrrr	r1zsz_ParentProcess.join)N)	r0rorpr:rGrrrPr1rOrrrr	rafs


rac@seZdZddZddZdS)_MainProcesscCs8d|_d|_d|_d|_d|_ttddd|_dS)NrZMainProcessF z/mp)rLZ	semprefix)	r!r2r&rr)rMr$urandomr"rrrr	r:sz_MainProcess.__init__cCsdSrrrrrr	rHsz_MainProcess.closeN)r0rorpr:rHrrrr	r|sr|rZZSIG_r)$__all__r$rhsignalr_rbZ_weakrefsetrpathabspathgetcwdZORIGINAL_DIROSErrorrrrr
objectrrvrMrar|r
rr9r r`rrWr__dict__itemsr'Zsignumr3rrrr	<module>
s<


!