7ec@s2dddgZddlZddlZddlZddlZyejjejZWne k rtdZnXdZ dZ dZ defdYZd efd YZd efd YZea[iZxGejjD]6\ZZed dkrdekreee ks(R tAssertionErrorRt_countertnextt _identityt_authkeyt _daemonict_tempdirtostgetpidt _parent_pidRt_targetttuplet_argstdictt_kwargsttypet__name__tjoint_name(tselftgroupttargettnametargstkwargstcount((s//usr/lib64/python2.7/multiprocessing/process.pyt__init__^s     cCs&|jr"|j|j|jndS(sQ Method to be run in sub-process; can be overridden in sub-class N(RRR(R$((s//usr/lib64/python2.7/multiprocessing/process.pytrunms cCs|jdkstd|jtjks<tdtj sRtdt|j dk rt|j }nddl m }|||_|` |` |`tjj|dS(s% Start child process scannot start a process twices:can only start a process object created by current processs3daemonic processes are not allowed to have childreni(tPopenN(RR RRRRRRRt_PopentforkingR-RRRRtadd(R$R-((s//usr/lib64/python2.7/multiprocessing/process.pytstartts    cCs|jjdS(sT Terminate process; sends SIGTERM signal or uses TerminateProcess() N(Rt terminate(R$((s//usr/lib64/python2.7/multiprocessing/process.pyR2scCsq|jtjks!td|jdk s<td|jj|}|dk rmtjj |ndS(s5 Wait until child process terminates scan only join a child processscan only join a started processN( RRRRRR twaitRRR (R$ttimeouttres((s//usr/lib64/python2.7/multiprocessing/process.pyR"s ! cCs{|tkrtS|jtjks1td|jdkrDtS|jj }|dkrctStj j |tSdS(s1 Return whether process is alive scan only test a child processN( RtTrueRRRRRR tFalseRRR (R$t returncode((s//usr/lib64/python2.7/multiprocessing/process.pytis_alives ! cCs|jS(N(R#(R$((s//usr/lib64/python2.7/multiprocessing/process.pyR'scCs(t|tstd||_dS(Nsname must be a string(t isinstancet basestringRR#(R$R'((s//usr/lib64/python2.7/multiprocessing/process.pyR'scCs|jS(s4 Return whether process is a daemon (R(R$((s//usr/lib64/python2.7/multiprocessing/process.pytdaemonscCs(|jdkstd||_dS(s1 Set whether process is a daemon sprocess has already startedN(RR RR(R$tdaemonic((s//usr/lib64/python2.7/multiprocessing/process.pyR<scCs|jS(N(R(R$((s//usr/lib64/python2.7/multiprocessing/process.pytauthkeyscCst||_dS(s2 Set authorization key of process N(tAuthenticationStringR(R$R>((s//usr/lib64/python2.7/multiprocessing/process.pyR>scCs#|jdkr|jS|jjS(sM Return exit code of process or `None` if it has yet to stop N(RR R(R$((s//usr/lib64/python2.7/multiprocessing/process.pytexitcodescCs-|tkrtjS|jo(|jjSdS(sU Return identifier (PID) of process or `None` if it has yet to start N(RRRRtpid(R$((s//usr/lib64/python2.7/multiprocessing/process.pytidents  cCs|tkrd}n]|jtjkr3d}n?|jdkrKd}n'|jjdk rl|j}nd}t|t t fkr|dkrd}qdt j ||}ndt|j |j||jrdpd fS( Ntstartedtunknowntinitialitstoppeds stopped[%s]s<%s(%s, %s%s)>s daemont(RRRRRR RR@R tinttlongt_exitcode_to_nametgetR!R#R(R$tstatus((s//usr/lib64/python2.7/multiprocessing/process.pyt__repr__s       cCsddlm}yt|_tjd|_y#tjj t t j t_Wnt tfk rmnX|a|jj|j|jdz|jd}Wd|jXWntk rH}|jsd}qt|jdttfrt|jd}qtjjt|jddtjjd}nGd}ddl}tjjd|j tjj|j!nX|jd||S( Ni(tutils child process calling self.run()is is Process %s: s process exiting with exitcode %d("RGRNtsetRt itertoolsR*RtsyststdintclosetopenRtdevnulltOSErrort ValueErrorRt_finalizer_registrytcleart_run_after_forkerstinfoR,t_exit_functiont SystemExitR(R:RHRItstderrtwriteRtflusht tracebackR't print_exc(R$RNR@teRa((s//usr/lib64/python2.7/multiprocessing/process.pyt _bootstrapsB         !    N((R!t __module__t__doc__R R.R+R,R1R2R"R9tpropertyR'tsetterR<R>R@RBRARMRd(((s//usr/lib64/python2.7/multiprocessing/process.pyRVs&       R?cBseZdZRS(cCs>ddlm}|js+tdntt|ffS(Ni(R-sJPickling an AuthenticationString object is disallowed for security reasons(R/R-tthread_is_spawningt TypeErrorR?tbytes(R$R-((s//usr/lib64/python2.7/multiprocessing/process.pyt __reduce__'s   (R!ReRl(((s//usr/lib64/python2.7/multiprocessing/process.pyR?&st _MainProcesscBseZdZRS(cCspd|_t|_d|_d|_d|_tjd|_ t |_ t t jd|_d|_dS(Nt MainProcessii ((RR7RR#R RRRPR*RRORR?RturandomRR(R$((s//usr/lib64/python2.7/multiprocessing/process.pyR+6s      (R!ReR+(((s//usr/lib64/python2.7/multiprocessing/process.pyRm4sitSIGt_(t__all__RRQtsignalRPtpathtabspathtgetcwdt ORIGINAL_DIRRVR RRRtobjectRRkR?RmRRJt__dict__titemsR'tsignum(((s//usr/lib64/python2.7/multiprocessing/process.pyt#s(