File "process.cpython-37.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python37/lib64/python3.7/multiprocessing/__pycache__/process.cpython-37.pyc
File size: 9.2 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

B

 f4)@sdddgZddlZddlZddlZddlZddlZddlmZyej	e
ZWnek
rjdZYnXddZ
ddZdd	ZGd
ddeZGdddeZGd
ddeZeaedaea[iZx<eejD]*\ZZedddkrdekreee<qWeZ dS)BaseProcesscurrent_processactive_childrenN)WeakSetcCstS)z@
    Return process object representing the current process
    )_current_processrr</opt/alt/python37/lib64/python3.7/multiprocessing/process.pyr$scCstttS)zN
    Return list of process objects corresponding to live child processes
    )_cleanuplist	_childrenrrrrr*scCs.x(ttD]}|jdk	r
t|q
WdS)N)r
r_popenpolldiscard)prrrr	5sr	c@seZdZdZddZddddifddddZd	d
ZddZd
dZddZ	ddZ
d,ddZddZddZ
eddZejddZeddZejddZedd Zejd!d Zed"d#Zed$d%ZeZed&d'Zd(d)Zd*d+ZdS)-rz
    Process objects represent activity that is run in a separate process

    The class is analogous to `threading.Thread`
    cCstdS)N)NotImplementedError)selfrrr_PopenEszBaseProcess._PopenNr)daemoncCs|dkstdtt}tj|f|_tj|_t|_	d|_
d|_||_t
||_t||_|pt|jdddd|jD|_|dk	r||_t|dS)Nz#group argument must be None for nowF-:css|]}t|VqdS)N)str).0irrr	<genexpr>Usz'BaseProcess.__init__.<locals>.<genexpr>)AssertionErrornext_process_counterr	_identity_configcopyosgetpid_parent_pidr_closed_targettuple_argsdict_kwargstype__name__join_namer	_danglingadd)rgrouptargetnameargskwargsrcountrrr__init__Hs


zBaseProcess.__init__cCs|jrtddS)Nzprocess object is closed)r#
ValueError)rrrr
_check_closedZszBaseProcess._check_closedcCs|jr|j|j|jdS)zQ
        Method to be run in sub-process; can be overridden in sub-class
        N)r$r&r()rrrrrun^szBaseProcess.runcCsz||jdkstd|jtks0tdtjdrDtdt	|
||_|jj|_|`
|`|`t|dS)z%
        Start child process
        Nzcannot start a process twicez:can only start a process object created by current processrz3daemonic processes are not allowed to have children)r7rrr"r r!rrgetr	rsentinel	_sentinelr$r&r(rr.)rrrrstartes
zBaseProcess.startcCs||jdS)zT
        Terminate process; sends SIGTERM signal or uses TerminateProcess()
        N)r7r	terminate)rrrrr=wszBaseProcess.terminatecCs||jdS)zT
        Terminate process; sends SIGKILL signal or uses TerminateProcess()
        N)r7rkill)rrrrr>~szBaseProcess.killcCsR||jtkstd|jdk	s0td|j|}|dk	rNt|dS)z5
        Wait until child process terminates
        zcan only join a child processNzcan only join a started process)	r7r"r r!rrwaitrr)rZtimeoutZresrrrr+szBaseProcess.joincCs`||tkrdS|jtks*td|jdkr8dS|j}|dkrNdSt	|dSdS)z1
        Return whether process is alive
        Tzcan only test a child processNF)
r7rr"r r!rrr
rr)r
returncoderrris_alives


zBaseProcess.is_alivecCsH|jdk	r>|jdkr 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)rr
r6closer;rrr#)rrrrrBs


zBaseProcess.closecCs|jS)N)r,)rrrrr1szBaseProcess.namecCst|tstd||_dS)Nzname must be a string)
isinstancerrr,)rr1rrrr1scCs|jddS)z4
        Return whether process is a daemon
        rF)rr9)rrrrrszBaseProcess.daemoncCs |jdkstd||jd<dS)z1
        Set whether process is a daemon
        Nzprocess has already startedr)rrr)rZdaemonicrrrrscCs
|jdS)Nauthkey)r)rrrrrDszBaseProcess.authkeycCst||jd<dS)z2
        Set authorization key of process
        rDN)AuthenticationStringr)rrDrrrrDscCs"||jdkr|jS|jS)zM
        Return exit code of process or `None` if it has yet to stop
        N)r7rr
)rrrrexitcodes
zBaseProcess.exitcodecCs*||tkrtS|jo$|jjSdS)zU
        Return identifier (PID) of process or `None` if it has yet to start
        N)r7rr r!rpid)rrrridentszBaseProcess.identcCs2|y|jStk
r,tddYnXdS)z{
        Return a file descriptor (Unix) or handle (Windows) suitable for
        waiting for process termination.
        zprocess not startedN)r7r;AttributeErrorr6)rrrrr:s
zBaseProcess.sentinelcCs|tkrd}nJ|jrd}n>|jtkr.d}n*|jdkr>d}n|jdk	rT|j}nd}t|t	kr|dkrrd}ndt
||}dt|j|j
||jrd	pd
fS)NZstartedclosedunknowninitialrZstoppedzstopped[%s]z<%s(%s, %s%s)>z daemon)rr#r"r r!rr
rFr)int_exitcode_to_namer9r*r,r)rZstatusrrr__repr__s"
zBaseProcess.__repr__c
CsRddlm}m}zy||jdk	r,||jtdata	|
t}|az|j
|Wd~X|dz|d}Wd|XWntk
r}zJ|jsd}n:t|jdtr|jd}ntjt|jddd}Wdd}~XYn2d}ddl}tjd|j|YnXWdt|d||X|S)N)utilcontextz child process calling self.run()r
zProcess %s:
z process exiting with exitcode %d) rMrRrSZ
_start_methodZ_force_start_method	itertoolsr4rsetrZ_close_stdinrZ_finalizer_registryclearZ_run_after_forkersinfor8Z_exit_function
SystemExitr2rCrNsysstderrwriter	tracebackr1	print_exc	threadingZ	_shutdownZ_flush_std_streams)rrRrSZold_processrFer]rrr
_bootstrapsD




zBaseProcess._bootstrap)N)r*
__module____qualname____doc__rr5r7r8r<r=r>r+rArBpropertyr1setterrrDrFrHrGr:rPrarrrrr?s0

c@seZdZddZdS)rEcCs,ddlm}|dkrtdtt|ffS)NrQ)get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)rSrg	TypeErrorrEbytes)rrgrrr
__reduce__Fs

zAuthenticationString.__reduce__N)r*rbrcrjrrrrrEEsrEc@seZdZddZddZdS)_MainProcesscCs8d|_d|_d|_d|_d|_ttddd|_dS)NrZMainProcessF z/mp)rDZ	semprefix)	rr,r"rr#rEr urandomr)rrrrr5Usz_MainProcess.__init__cCsdS)Nr)rrrrrBgsz_MainProcess.closeN)r*rbrcr5rBrrrrrkSsrkrQZSIG_)!__all__r rZsignalrUr_Z_weakrefsetrpathabspathgetcwdZORIGINAL_DIROSErrorrrr	objectrrirErkrr4rrVrrOr
__dict__itemsr1Zsignumr-rrrr<module>
s6