+
    i/  c                   s   . ROt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt  ]P                  P                  ]P                  ! 4       4      tR tR tR tR t ! R R ]4      t ! R R	]4      t ! R
 R]4      t ! R R]4      tRs]! 4       s]P2                  ! ^4      s]! 4       sA/ t]! ]P>                  PA                  4       4       F(  w  t!t"]!R,          R8X  g   K  R]!9  g   K  R]! 2]]") &   K*  	  A!A"]! 4       t#R#   ] d    Rt Li ; i)BaseProcessN)WeakSetc                     \         # )z8
Return process object representing the current process
)_current_process     0/usr/lib64/python3.14/multiprocessing/process.pycurrent_processr   %   s
     r   c                 s4    \        4        \        \        4      # )zF
Return list of process objects corresponding to live child processes
)_cleanuplist	_childrenr   r   r   active_childrenr   +   s     J	?r   c                 r   )z7
Return process object representing the parent process
)_parent_processr   r   r   parent_processr   3   s
     r   c                  s    \        \        4       FB  p V P                  ;p'       g   K  VP                  4       f   K-  \        P	                  V 4       KD  	  R # N)r	   r
   _popenpolldiscard)ZpZchild_popens     r   r   r   =   s>    )_88#K##)9)9);)Ga  r   c                   sf  a  ] tR t^Gt o RtR tRRR/R lltR tR tR t	R	 t
R
 tR tRR ltR tR t]R 4       t]P$                  R 4       t]R 4       t]P$                  R 4       t]R 4       t]P$                  R 4       t]R 4       t]R 4       t]t]R 4       tR tRR lt]R 4       tRtV tR# )r    zt
Process objects represent activity that is run in a separate process

The class is analogous to `threading.Thread`
c                s    \         hr   )ZNotImplementedErrorself   &r   _PopenZBaseProcess._PopenM   s    !!r   Ndaemonc               s`   \        \        4      p\        P                  V3,           V n        \        P                  P                  4       V n        \        P                  ! 4       V n        \        P                  V n
        R V n        RV n        W n        \        V4      V n        V'       d   \!        V4      M/ V n        T;'       gD    \%        V 4      P&                  R,           RP)                  R V P                   4       4      ,           V n        Ve   W`n        \.        P1                  V 4       R # )NF-Z:c              3   s8   "   T F  p\        V4      x  K  	  R # 5ir   )str)Z.0Zi   & r   Z	<genexpr>Z'BaseProcess.__init__.<locals>.<genexpr>^   s     =nc!ffns   )Znext_process_counterr   	_identity_configZcopyosgetpid_parent_pidname_parent_namer   _closed_targetZtuple_argsZdict_kwargstype__name__join_namer   	_danglingadd)r   ZgroupZtargetr    ZargsZkwargsr   counts   &&&&&&$ r   __init__ZBaseProcess.__init__P   s     %&)33uh>'//44699;,114[
'-tF|2 > >T$Z0036XX=dnn==>
 Kdr   c                s@    V P                   '       d   \        R 4      hR# )zprocess object is closedN)r"   
ValueErrorr   r   r   _check_closedZBaseProcess._check_closedc   s    <<<788 r   c                sz    V P                   '       d)   V P                   ! V P                  / V P                  B  R# R# )zA
Method to be run in sub-process; can be overridden in sub-class
N)r#   r$   r%   r   r   r   runZBaseProcess.rung   s+     <<<LL$**55 r   c                s    V P                  4        \        4        V P                  V 4      V n        V P                  P                  V n        V =V =V =\        P                  V 4       R# )z
Start child process
N)r/   r   r   r   sentinel	_sentinelr#   r$   r%   r
   r+   r   r   r   startZBaseProcess.startn   sS     	 	
kk$'-- L$*dldr   c                Z    V P                  4        V P                  P                  4        R# )z(
Terminate process; sends SIGINT signal
N)r/   r   	interruptr   r   r   r5   ZBaseProcess.interrupt         	r   c                r4   )zD
Terminate process; sends SIGTERM signal or uses TerminateProcess()
N)r/   r   	terminater   r   r   r7   ZBaseProcess.terminate   r6   r   c                r4   )zD
Terminate process; sends SIGKILL signal or uses TerminateProcess()
N)r/   r   killr   r   r   r8   ZBaseProcess.kill   s      	r   c                s    V P                  4        V P                  P                  V4      pVe   \        P	                  V 4       R# R# )z%
Wait until child process terminates
N)r/   r   waitr
   r   )r   timeoutZres   && r   r(   ZBaseProcess.join   s>     	 kkw'?d# r   c                s    V P                  4        V \        J d   R# V P                  f   R# V P                  P                  4       pVf   R# \        P                  V 4       R# )z!
Return whether process is alive
TF)r/   r   r   r   r
   r   )r   Z
returncoder   r   is_aliveZBaseProcess.is_alive   sW     	## ;;[[%%'
d#r   c                s    V P                   e`   V P                   P                  4       f   \        R4      hV P                   P                  4        RV n         V =\
        P                  V 4       RV n        R# )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   r.   closer2   r
   r   r"   r   r   r   r=   ZBaseProcess.close   sg     ;;"{{!)  "P Q QKKDKd#r   c                    V P                   # r   r)   r   r   r   r    BaseProcess.name   s    zzr   c                s    Wn         R # r   r?   )r   r       &&r   r    r@      s	     
r   c                s:    V P                   P                  RR4      # )z$
Return whether process is a daemon
r   F)r   getr   r   r   r   BaseProcess.daemon   s    
 ||%00r   c                s"    WP                   R&   R# )z!
Set whether process is a daemon
r   Nr   )r   ZdaemonicrA   r   r   rC      s     "*Xr   c                s(    V P                   R ,          # )authkeyrD   r   r   r   rE   BaseProcess.authkey   s    ||I&&r   c                s6    \        V4      V P                  R&   R# )z"
Set authorization key of process
rE   N)AuthenticationStringr   )r   rE   rA   r   rE   rF      s    
 #7w"?Yr   c                s    V P                  4        V P                  f   V P                  # V P                  P                  4       # )z=
Return exit code of process or `None` if it has yet to stop
)r/   r   r   r   r   r   exitcodeZBaseProcess.exitcode   s7    
 	;;;;{{!!r   c                s    V P                  4        V \        J d   \        P                  ! 4       # V P                  ;'       d    V P                  P
                  # )zE
Return identifier (PID) of process or `None` if it has yet to start
)r/   r   r   r   r   pidr   r   r   identZBaseProcess.ident   s?    
 	##99;;;224;;??2r   c                sr    V P                  4         V P                  #   \         d    \        R4      Rhi ; i)zc
Return a file descriptor (Unix) or handle (Windows) suitable for
waiting for process termination.
zprocess not startedN)r/   r2   ZAttributeErrorr.   r   r   r   r1   ZBaseProcess.sentinel   s<     		>>>! 	>23=	>s    6c                s   R pV \         J d   RpMpV P                  '       d   RpM[V P                  \        P                  ! 4       8w  d   RpM4V P
                  f   RpM#V P
                  P                  4       pVe   RpMRp\        V 4      P                  RV P                  ,          .pV P
                  e-   VP                  RV P
                  P                  ,          4       VP                  RV P                  ,          4       VP                  V4       Ve.   \        P                  W4      pVP                  R	V,          4       V P                  '       d   VP                  R
4       RRP                  V4      ,          # )NZstartedZclosedZunknownZinitialZstoppedzname=%rzpid=%sz	parent=%szexitcode=%sr   z<%s>Z )r   r"   r   r   r   r   r   r&   r'   r)   ZappendrI   _exitcode_to_namerB   r   r(   )r   rH   Zstatusinfos   &   r   __repr__ZBaseProcess.__repr__
  s   ##F\\\F,F[[ F{{'')H#""T
##Y%;<;;"KK4;;??23K$"2"223F(,,X@HKK01;;;KK!&&r   c                s   ^RI HpHp  V P                  e   VP	                  V P                  4       \
        P                  ! ^4      s\        4       s	VP                  4        \        pV s\        V P                  V P                  V4      s\         P"                  '       d$   \         P$                  ! 4       P'                  4         V P)                  4        ?VP+                  R4       V P-                  4        ^ p\         PD                  ! 4        TP+                  RT,          4       TPG                  4        T#   ?i ; i  \.         d   pTP0                  f   ^ p Rp?Le\3        TP0                  \4        4      '       d   TP0                  p Rp?L\6        P8                  P;                  \=        TP0                  4      R,           4       ^p Rp?LRp?i ^p^ RIp\6        P8                  P;                  RT P@                  ,          4       TPC                  4         EL$; i  \         PD                  ! 4        TP+                  RX,          4       TPG                  4        i ; i)   )utilcontextNz child process calling self.run()Z
zProcess %s:
z process exiting with exitcode %d)$ rO   rP   Z_start_methodZ_force_start_method	itertoolsr,   r   setr
   Z_close_stdinr   _ParentProcessr!   r   r   	threadingZ_HAVE_THREAD_NATIVE_IDZmain_threadZ_set_native_id_after_forkrL   r0   Z
SystemExitZcodeZ
isinstanceZintsysZstderrZwriter   	tracebackr    Z	print_excZ	_shutdownZ_flush_std_streams)r   Zparent_sentinelrO   rP   Zold_processrH   ZerX   s   &&      r   
_bootstrapZBaseProcess._bootstrap)  s   #%	&!!-++D,>,>?(q1I*K#,!!4#3#3_FO///%%'668   "  II89HHJH !II88CD##%-    	vv~AFFC((66

  QVVt!34	"HJJ_tyy89!!II88CD##%s[   B;D? D9 $D? 9D<<D? ?H
GH! ,GH! ;GH! AHH! !?I c                 sf    ^RI Hp  V P                  P                  4        V P	                  4        R# )rN   rO   N)rQ   rO   Z_finalizer_registryZclearZ_run_after_forkersrZ   s    r   rV   ZBaseProcess._after_forkV  s#      &&(!r   )r$   r"   r   r   r%   r)   r!   r   r   r2   r#   r   )NNNr   Nr   )r'   
__module____qualname____firstlineno__Z__doc__r   r-   r/   r0   r3   r5   r7   r8   r(   r<   r=   propertyr    Zsetterr   rE   rH   rJ   rI   r1   rM   rY   ZstaticmethodrV   __static_attributes____classdictcell__Z__classdict__   @r   r    r    G   s/    
"&96$  	$&"   
[[  1 1 ]]* * ' ' ^^@ @ " " 3 3 C	> 	>'>+Z " "r   c                   s&   a  ] tR tRt o R tRtV tR# )rG   ia  c                sZ    ^RI Hp V! 4       f   \        R4      h\        \	        V 4      33# )rN   )get_spawning_popenzJPickling an AuthenticationString object is disallowed for security reasons)rP   rc   Z	TypeErrorrG   bytes)r   rc   r   r   
__reduce__ZAuthenticationString.__reduce__b  s3    /'2  $eDk^33r   r   N)r'   r[   r\   r]   re   r_   r`   ra   rb   r   rG   rG   a  s     4 4r   rG   c                   sJ   a  ] tR tRt o R tR t]R 4       tRR lt]t	Rt
V tR# )	rT   ip  c                sp    RV n         Wn        W n        R V n        R V n        RV n        W0n        / V n        R # )NFr   )r   r)   _pidr   r   r"   r2   r   )r   r    rI   r1   s   &&&&r   r-   Z_ParentProcess.__init__r  s5    
	!r   c                sB    ^ RI Hp V! V P                  .^ R7      '       * # )i    r9   r:   Zmultiprocessing.connectionr9   r2   )r   r9   r   r   r<   Z_ParentProcess.is_alive|  s    3(!444r   c                r>   r   )rf   r   r   r   rJ   Z_ParentProcess.ident  s    yyr   Nc                s<    ^ RI Hp V! V P                  .VR7       R# )z&
Wait until parent process terminates
rg   rh   Nri   )r   r:   r9   r;   r   r(   Z_ParentProcess.join  s     	4dnnw/r   )r"   r   r   r)   r   rf   r   r2   r   )r'   r[   r\   r]   r-   r<   r^   rJ   r(   rI   r_   r`   ra   rb   r   rT   rT   p  s/     5  0 Cr   rT   c                   s,   a  ] tR tRt o R tR tRtV tR# )_MainProcessi  c                s    RV n         R V n        RV n        RV n        RV n        R\        \        P                  ! ^ 4      4      RR/V n        R# )ZMainProcessNFrE   Z	semprefixz/mpr   )	r   r)   r   r   r"   rG   r   Zurandomr   r   r   r   r-   Z_MainProcess.__init__  sG    "
!#7

2#G#U,r   c                s    R # r   r   r   r   r   r=   Z_MainProcess.close  s    r   )r"   r   r   r)   r   r   N)r'   r[   r\   r]   r-   r=   r_   r`   ra   rb   r   rj   rj     s     ,$ r   rj   :Ni   NZSIGZ_r   )r    r   r   r   )$Z__all__r   rW   ZsignalrR   rU   Z_weakrefsetr   ZpathZabspathZgetcwdZORIGINAL_DIRZOSErrorr   r   r   r   Zobjectr    rd   rG   rT   rj   r   r   r,   r   rS   r
   rK   r	   Z__dict__Zitemsr    Zsignumr*   r   r   r   <module>rk      s    
 
    77??299;/L!S"& S"t45 4[ B; 0 > ??1% E	  ..01LD&Bx3d?'(Z6'" 2 	& I	{  Ls   *C> >	D
	D
