{fc@sddlZddlZddlZddlZddlmZmZddddddgZd Zdd l m Z de fd YZ d Z e j ee je d Ze j eejee j eejeyddlmZWnek rn#XdZdZe j eeejdkrddlZejZejZej Z de!fdYZ"n}ddl#Z#ddl$Z$ddl%Z%ddlZddl&m'Z'm(Z(m)Z)ddlm*Z*ddl m+Z+m,Z,ddZ.dZ/ejdko%e0ede1Z2ej3j4j5dZ6e'j7Ze'j8Z e6rsej9j:ej;da<n ej3a<dZ=de1dZde!fdYZ"dZ>d Z?d!Z@d"ZAd#ZBd$ZCe j e(eCe j e)eCgZDd%ZEdS(&iN(tutiltprocesstPopentassert_spawningtexitt duplicatetclosetForkingPicklercCs,tjs(tdt|jndS(NsF%s objects should only be shared between processes through inheritance(Rtthread_is_spawningt RuntimeErrorttypet__name__(tself((s//usr/lib64/python2.7/multiprocessing/forking.pyR0s (tPicklercBs&eZejjZedZRS(cs fd}||j|siitwb(R1tpipeRtmsvcrtt get_osfhandleR;Rtget_command_linetjoinRdt CreateProcessRaRtCloseR3R0t_handletget_preparation_datat_nametfdopentintRt_tlstprocess_handleR]R\( R R8trfdtwfdtrhandletcmdthpthtR3ttidt prep_datatto_child((s//usr/lib64/python2.7/multiprocessing/forking.pyR:s( -      cCsttjdddk S(NR}(RRR|R(((s//usr/lib64/python2.7/multiprocessing/forking.pyRscCst|tjjS(N(RRR|R}(Ri((s//usr/lib64/python2.7/multiprocessing/forking.pytduplicate_for_childscCs|jdkr|dkr'tj}ntdt|dd}tjt|j|}|tjkrtj |j}|t krt j }n||_qn|jS(Niig?( R0RRdtINFINITEtmaxR{tWaitForSingleObjectRwt WAIT_OBJECT_0tGetExitCodeProcesst TERMINATERQRR(R RJtmsecsRMR9((s//usr/lib64/python2.7/multiprocessing/forking.pyRO"s    cCs|jddS(NRJi(RO(R ((s//usr/lib64/python2.7/multiprocessing/forking.pyRF2scCse|jdkraytjt|jtWqatk r]|jdddkr^q^qaXndS(NRJg?( R0RRdtTerminateProcessR{RwRt WindowsErrorRO(R ((s//usr/lib64/python2.7/multiprocessing/forking.pyRT5s  N(R Rt__doc__tthreadt_localR|R:RWRRRRORFRT(((s//usr/lib64/python2.7/multiprocessing/forking.pyRs  !  cCs.t|dkr&|ddkr&tStSdS(sE Return whether commandline indicates we are forking iis--multiprocessing-forkN(tlenR;RU(targv((s//usr/lib64/python2.7/multiprocessing/forking.pyt is_forkingAs"cCs'ttjr#ttjndS(sM Run code for process object if this in not the main process N(RR,RtmainR(((s//usr/lib64/python2.7/multiprocessing/forking.pytfreeze_supportLscCstttjdtr'tdnttdtrFtjdgSd}tj}t g|d|dgSdS(sR Returns prefix of command line used for spawning a child process t _inheritings Attempt to start a new process before the current process has finished its bootstrapping phase. This probably means that you are on Windows and you have forgotten to use the proper idiom in the main module: if __name__ == '__main__': freeze_support() ... The "freeze_support()" line can be omitted if the program is not going to be frozen to produce a Windows executable.R`s--multiprocessing-forks0from multiprocessing.forking import main; main()s-cN( RRtcurrent_processRUR R,t executableRt_args_from_interpreter_flagsRa(tprogtopts((s//usr/lib64/python2.7/multiprocessing/forking.pyRsUs   cCsttjd}tj|tj}tj|d}tt j _ t |}t |t |}tt j _ |j|j}t|dS(s? Run code specified by data received over pipe itrbN(R{R,RRqtopen_osfhandleR1tO_RDONLYRzR;RRRR[tprepareRURR6R(Ritfdt from_parenttpreparation_dataR texitcode((s//usr/lib64/python2.7/multiprocessing/forking.pyRps     c CsLddlm}m}td|dtjdtjd|dtjdtj j }|dk rt|j |d tmultiprocessingRRt__all__RtpickleR RR RR tsaveR"tlistRR{t__add__t functoolsR#t ImportErrorR)R$tplatformRGR7RtdupRRtobjectRRRqRdt_multiprocessingR*RXRYRZR[R\RR]RRRURRRRRt ExitProcesst CloseHandleRRtt exec_prefixRaRcRRRsRRxRRR(((s//usr/lib64/python2.7/multiprocessing/forking.pyt#sn              G     !     N   #