Pc@sddlZddlZddlZddlmZmZddddddgZd Zdd lm Z de fd YZ d Z e j e e je d Ze j e ejee j e ejeyddlmZWnek rn#XdZdZe j eeejdkrwddlZejZejZejZde fdYZ!nwddl"Z"ddl#Z#ddl$Z$ddlZddl%m&Z&m'Z'm(Z(ddlm)Z)ddlm*Z*m+Z+ddZ-dZ.ejdkoe/ede0Z1e&j2Ze&j3Zej4j5j6draej7j8ej9da:n ej4a:dZ;de0dZde fdYZ!dZ<d Z=d!Z>d"Z?d#Z@d$ZAe j e'eAe j e(eAgZBd%ZCdS(&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(..\python\lib\multiprocessing\forking.pyRs (tPicklercBs&eZejjZedZRS(cs fd}||j|siitwb(R1tpipeRtmsvcrtt get_osfhandletTrueRtget_command_linetjoinRct CreateProcessR`RtCloseR3R0t_handletget_preparation_datat_nametfdopentintRt_tlstprocess_handleR\R[( R R8trfdtwfdtrhandletcmdthpthtR3ttidt prep_datatto_child((s(..\python\lib\multiprocessing\forking.pyR:s( -      cCsttjdddk S(NR}(RRR|R(((s(..\python\lib\multiprocessing\forking.pyRscCst|tjjS(N(RRR|R}(Rh((s(..\python\lib\multiprocessing\forking.pytduplicate_for_childscCs|jdkr|dkr'tj}ntdt|dd}tjt|j|}|tjkrtj |j}|t krt j }n||_qn|jS(Niig?( R0RRctINFINITEtmaxR{tWaitForSingleObjectRwt WAIT_OBJECT_0tGetExitCodeProcesst TERMINATERORP(R RHtmsecsRKR9((s(..\python\lib\multiprocessing\forking.pyRMs    cCs|jddS(NRHi(RM(R ((s(..\python\lib\multiprocessing\forking.pyRDscCse|jdkraytjt|jtWqatk r]|jdddkr^q^qaXndS(NRHg?( R0RRctTerminateProcessR{RwRt WindowsErrorRM(R ((s(..\python\lib\multiprocessing\forking.pyRSs  N(R Rt__doc__tthreadt_localR|R:RVRRRRMRDRS(((s(..\python\lib\multiprocessing\forking.pyRs  !  cCsFt|dkr>|ddkr>t|dks:ttStSdS(sE Return whether commandline indicates we are forking iis--multiprocessing-forkiN(tlenR@RrRT(targv((s(..\python\lib\multiprocessing\forking.pyt is_forking s"cCs'ttjr#ttjndS(sM Run code for process object if this in not the main process N(RR,RtmainR(((s(..\python\lib\multiprocessing\forking.pytfreeze_support+scCsltjjdkr3ttjr3tdnttdtrRtj dgSd}t d|dgSdS(sR Returns prefix of command line used for spawning a child process s 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(( Rtcurrent_processt _identityRR,RR RRTt executableR`(tprog((s(..\python\lib\multiprocessing\forking.pyRs4s$  cCsttjstttjd}tj|tj}tj |d}t t j _ t|}t|t|}tt j _ |j|j}t|dS(s> Run code specifed by data received over pipe itrbN(RR,RR@R{Rptopen_osfhandleR1tO_RDONLYRzRrRRt _inheritingRZtprepareRTRR6R(Rhtfdt from_parenttpreparation_dataR texitcode((s(..\python\lib\multiprocessing\forking.pyRNs     c Cs&ddlm}m}td|dtjdtjd|dtjdtj j }|dk rt|j |d sj             B     !     N   "