VccsBddlZddlZddlZddlZddlZddlmZmZmZddl m Z ddl m Z dgZ dZ ejdko eed d Zejd Zd Zeejej Zd ZGddeZdS)Ni) reductionget_spawning_popenset_spawning_popen)spawn)utilPopeniZwin32ZfrozenFzpythonservice.execs||kp?tj|tj|kSN)osZpathZnormcase)Zp1Zp2 :/usr/lib64/python3.11/multiprocessing/popen_spawn_win32.py_path_eqr s6 8 Crw''++rw/?/?/C/CCCcs8|D]}tj|dSr)_winapi CloseHandle)Zhandleshandler r _close_handlesrs/$$F####$$r cs>eZdZ dZdZdZd dZdZdZeZ dZ dS) rrc sxtj|j}tjdd\}}t j|d}tjtj |}tj }trYt|tjr?tjx|d<}tj}tj|d<nd}dd|D}t'|dd5} tj||ddd d|dd \} } } } tj| n#tj|xYw| |_d|_| |_t3| |_t7j|t:|jt3|f|_t?| tAj!|| tAj!|| t?dn#t?dwxYw ddddS#1swxYwYdS) Nr)Z parent_pidZ pipe_handleZ__PYVENV_LAUNCHER__z c3s K|] }d|zV dS)z"%s"N)Z.0Zxr r z z!Popen.__init__..Es&//avz//////r ZwbT)ZclosefdF)"rZget_preparation_dataZ_namer Z CreatePipemsvcrtZopen_osfhandleZget_command_linerZgetpidZget_executableWINENVr sys executable_base_executableZenvironZcopyZjoinZopenZ CreateProcessrpid returncode_handleintsentinelrZFinalizer finalizerrrZdump)selfZ process_objZ prep_dataZrhandleZwhandleZwfdZcmdZ python_exeZenvZto_childZhpZhtrZtids r __init__zPopen.__init__,sr.{/@AA #-dA66#GQ//$ 18:::)++   hz3>:: "%"6 6CFZ*//##C),C% & &Chh//3///// #tT * * * )h #*#8$q#tT$;$; BS#B'''' #G,,,DH"DODLGGDM!]4,0M3w<<+HJJDN t $ $ $ )y(333{H555"4(((("4(((((3 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )sCH/5E  H/ E##A/H/*H =H/ HH//H36H3cs6tj||jSr)rZ duplicater)rrr r duplicate_for_childzPopen.duplicate_for_childbs"64=999r Ncs`|j| tj}n#tdt |dzdz}tjt |j|}|tjkr8tj|j}|tkr tj }||_|jS)Nrig?) rr ZINFINITEZmaxrZWaitForSingleObjectrZ WAIT_OBJECT_0ZGetExitCodeProcess TERMINATEsignalZSIGTERM)rtimeoutZmsecsZresZcodes r waitz Popen.waitfs ? ' :(As7T>C#78899-c$,.?.?GGCg++ '1$,??9$+"N?D"&r cs.|dS)Nrr")r#r r pollz Popen.pollvsyyy###r cs|jW tjt|jt dS#t $r|dYdSwxYwdS)Ng?r$)rr ZTerminateProcessrrr ZOSErrorr#r%r&r terminatezPopen.terminateys ?  (T\):):IFFFFF   99S9))   s,7!AAcs.|dSr)rr%r&r closez Popen.closes r r) Z__name__Z __module__Z __qualname__Zmethodrrr#r'r(Zkillr)rr r rr&sF4)4)4)l::: $$$ Dr )rrr!rr ZcontextrrrZrrZ__all__r ZplatformZgetattrZWINEXErZlowerZendswithZ WINSERVICEr rrrZobjectrrr r r*s= FFFFFFFFFF )  ,' ! Cggc8U&C&C ^ ! ! # # , ,-@ A A DDDXcnc&: ; ; ;$$$^^^^^F^^^^^r