+
    i%  c                   s   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^RI	H
t
 . R$Ot]P                  R8H  ;'       g6    ]! ]R4      ;'       d%    ]! ]R4      ;'       d    ]! ]P                  R4      t ! R	 R]P                  4      t]P"                  tR%R
 lt]P                  R8X  d.   ]. R&O,          t^ RItR'RR/R lltR tR tR t ! R R]4      tM]. R(O,          t^ RItR tR tR tR tR tR t ! R R4      t]! ] ! ]! 4       PB                  4      ]4       R t"]! ] ! ]#PH                  4      ]"4       ]! ] ! ]%PL                  4      ]"4       R t'R t(]! ]PR                  ]'4       ]P                  R8X  d   R t*R t+]! ]P                  ]*4       MR t*R  t+]! ]P                  ]*4        ! R! R"]R#7      t,R# ))i    )ABCMetaN)contextForkingPicklerwin32ZCMSG_LEN
SCM_RIGHTSsendmsgc                   s   a a ] tR t^!t oRt/ t]P                  tV 3R lt	]
R 4       t]
RR l4       t]P                  tRtVtV ;t# )r   z)Pickler subclass used by multiprocessing.c                s   < \         SV `  ! V!   V P                  P                  4       V n        V P                  P                  V P                  4       R # N)Zsuper__init___copyreg_dispatch_tableZcopydispatch_tableZupdate_extra_reducers)selfargs	__class__s   &*2/usr/lib64/python3.14/multiprocessing/reduction.pyr   ZForkingPickler.__init__&   sA    $"::??A""4#7#78    c                s"    W P                   V&   R# )z&Register a reduce function for a type.N)r
   )clstypeZreduce   &&&r   registerZForkingPickler.register+   s     %+D!r   c                sz    \         P                  ! 4       pV ! W24      P                  V4       VP                  4       # r   )ioZBytesIOdumpZ	getbuffer)r   objprotocolZbuf   &&& r   dumpsZForkingPickler.dumps0   s,    jjlC$}}r   )r	   r   )__name__
__module____qualname____firstlineno____doc__r
   copyregr	   r   r   Zclassmethodr   r   pickleZloads__static_attributes____classdictcell__Z__classcell__)r   __classdict__s   @@r   r   r   !   sS     3O%449
 + +  
 LLEEr   c                s:    \        W4      P                  V 4       R# )z3Replacement for pickle.dump() using ForkingPickler.N)r   r   )r   Zfiler   r   r   r   r   :   s    4"'',r   	DupHandlesource_processc               s    \         P                  ! 4       pVf   TpVf   Tp\         P                  ! W0V^ V\         P                  4      # )z<Duplicate a handle.  (target_process is a handle not a pid!))_winapiGetCurrentProcessDuplicateHandleDUPLICATE_SAME_ACCESS)handleZtarget_processZinheritabler%   Zcurrent_processs   &&&$ r   	duplicater+   G   sM     "335!,N!,N&&N{G99; 	;r   c           	     sR   \         P                  ! \         P                  RV 4      p \         P                  ! W!\         P                  ! 4       ^ R\         P
                  \         P                  ,          4      \         P                  ! V4       #   \         P                  ! T4       i ; i)z5Steal a handle from process identified by source_pid.F)r&   OpenProcessPROCESS_DUP_HANDLEr(   r'   r)   DUPLICATE_CLOSE_SOURCECloseHandle)Z
source_pidr*   Zsource_process_handle   && r   steal_handler1   S   s|     ' 3 3&&z!;	7**%))+Q--0N0NNP
  56G 56s   AB B&c                s^    \        V\        P                  V4      pV P                  V4       R# z&Send a handle over a local connection.N)r$   r&   r)   send)connr*   destination_pidZdhr   r   send_handler6   _   s!    vw<<oN		"r   c                s>    V P                  4       P                  4       # ))Receive a handle over a local connection.)recvdetach)r4      &r   recv_handler;   d   s    yy{!!##r   c                   s4   a  ] tR t^ht o RtRR ltR tRtV tR# )r$   zPicklable wrapper for a handle.Nc                sd   Vf   \         P                  ! 4       p\        P                  ! \        P                  RV4      p \        P
                  ! \        P                  ! 4       WVR^ 4      V n        \        P                  ! V4       W n	        W0n
        R #   \        P                  ! T4       i ; iNF)osgetpidr&   r,   r-   r(   r'   _handler/   _access_pid)r   r*   ZaccessZpidproc   &&&& r   r   ZDupHandle.__init__j   s    { iik&&w'A'A5#ND*&66--/&% 4 ##D)!LI ##D)s   2B B/c                s   V P                   \        P                  ! 4       8X  d   V P                  # \        P
                  ! \        P                  RV P                   4      p \        P                  ! WP                  \        P                  ! 4       V P                  R\        P                  4      \        P                  ! V4       #   \        P                  ! T4       i ; i)z1Get the handle.  This should only be called once.F)rA   r=   r>   r?   r&   r,   r-   r(   r'   r@   r.   r/   )r   rB      & r   r9   ZDupHandle.detachy   s     yyBIIK'||#&&w'A'A5'+yy2D*..,,(A(A(CLL%)G)GI ##D)##D)s   "AC C)r@   r?   rA   r   )	r   r   r   r   r   r   r9   r!   r"   r#      @r   r$   r$   h   s     -		* 	*r   c                s   \         P                   ! RV4      p\        \        V4      R,          .4      pV P                  V.\        P
                  \        P                  V3.4       V P                  ^4      R8w  d   \        R4      hR# )z,Send an array of fds over an AF_UNIX socket.i      Az%did not receive acknowledgement of fdN)	arrayZbyteslenr   socket
SOL_SOCKETr   r8   RuntimeError)sockZfdsmsgr0   r   sendfdsrQ      sn    kk#s#SX^$%cUf//1B1BCHIJ99Q<4FGG  r   c                s   \         P                   ! R4      pVP                  V,          pV P                  ^\        P                  ! V4      4      w  rErgV'       g   V'       g   \
        h V P                  R4       \        V4      ^8w  d   \        R\        V4      ,          4      hV^ ,          w  rp
V\        P                  8X  d   V	\        P                  8X  d   \        V
4      VP                  ,          ^ 8w  d   \        hVP                  V
4       \        V4      R,          V^ ,          8w  d,   \        RP                  \        V4      V^ ,          4      4      h\        V4      # \        R4      h  \        \         3 d     Li ; i)z/Receive an array of fds over an AF_UNIX socket.rG   rI   zreceived %d items of ancdatarH   z Len is {0:n} but msg[0] is {1!r}zInvalid data received)rJ   ZitemsizeZrecvmsgrL   Z
CMSG_SPACEZEOFErrorr3   rK   rN   rM   r   
ValueErrorZ	frombytesZAssertionErrorZformatlistZ
IndexError)rO   ZsizeZaZ
bytes_sizerP   ZancdataZflagsZaddrZ
cmsg_levelZ	cmsg_typeZ	cmsg_datas   &&         r   recvfdsrT      sA   KKZZ$&
$(LLF4E4Ej4Q$R!e7N	
 IIdO7|q "#A#&w<$0 1 1/6qz,J9f///V...y>AJJ.!3$$I&q6C<3q6)(:AAFCF,- - Aw 233 J' 		s   *C=E3 3FFc                s    \         P                  ! V P                  4       \         P                  \         P                  4      ;_uu_ 4       p\        W1.4       RRR4       R#   + '       g   i     R# ; ir2   )rL   fromfdfilenoAF_UNIXSOCK_STREAMrQ   )r4   r*   r5   sr   r   r6   r6      sB    ]]4;;=&..&:L:LMMQRAx  NMMMs   A""A3	c                s    \         P                  ! V P                  4       \         P                  \         P                  4      ;_uu_ 4       p\        V^4      ^ ,          uuRRR4       #   + '       g   i     R# ; i)r7   N)rL   rU   rV   rW   rX   rT   )r4   rY   rD   r   r;   r;      sF    ]]4;;=&..&:L:LMMQR1a=# NMMMs   A))A:	c                s    \         P                  ! 4       pVe!   VP                  VP                  V 4      4      # \        '       d   ^RIHp VP                  V 4      # \        R4      h)zReturn a wrapper for an fd.)resource_sharerz&SCM_RIGHTS appears not to be available)r   Zget_spawning_popenDupFdZduplicate_for_childHAVE_SEND_HANDLE rZ   rR   )fdZ	popen_objrZ   s   &  r   r[   r[      sV    ..0	 ??9#@#@#DEE)"((,,EFFr   c                 s    V P                   f)   \        V P                  V P                  P                  33# \        V P                   V P                  P                  33# r   )Z__self__getattrr   Z__func__r   Zmr:   r   _reduce_methodra      sH    zzajj&9&9:::QZZ%8%8999r   c                   s&   a  ] tR t^t o R tRtV tR# )_Cc                s    R # r    )r   r:   r   fZ_C.f   s    r   rc   N)r   r   r   r   rd   r!   r"   rE   rF   r   rb   rb      s      r   rb   c                 s>    \         V P                  V P                  33# r   )r_   Z__objclass__r   r`   r:   r   _reduce_method_descriptorre      s    Q^^QZZ000r   c                 sh    \         V P                  V P                  V P                  ;'       g    / 33# r   )_rebuild_partialfuncr   keywords)Zpr:   r   _reduce_partialri      s(    affaffajj.>.>B???r   c                 s6    \         P                  ! V .VO5/ VB # r   )	functoolspartial)rg   r   rh   r   r   rf   rf      s    T5D5H55r   c                 s,    ^RI Hp \        V! V 4      33# )i   )	DupSocket)rZ   rl   _rebuild_socket)rY   rl   rD   r   _reduce_socketrn      s    .1//r   c                 s"    V P                  4       # r   )r9   )Zdsr:   r   rm   rm      s    yy{r   c                 s    \        V P                  4       4      p\        WP                  V P                  V P
                  33# r   )r[   rV   rm   familyr   proto)rY   dfrD   r   rn   rn      s0    188:XXqvvqww ???r   c                 sR    V P                  4       p\        P                  ! WW4R 7      # ))rV   )r9   rL   )rq   ro   r   rp   r^   rC   r   rm   rm      s    YY[}}V5<<r   c                   s   a  ] tR t^t o Rt]t]t]t]t]	t	]
P                  R8X  d   ]t]t]tM]t]t]t]t]t]t]t]tR tRtV tR# )AbstractReducerzAbstract base class for use in implementing a Reduction class
suitable for use in replacing the standard reduction mechanism
used in multiprocessing.r   c                sp   \        \        \        4       P                  4      \        4       \        \        \
        P                  4      \        4       \        \        \        P                  4      \        4       \        \        P                  \        4       \        \        P                  \        4       R # r   )r   r   rb   rd   ra   rS   appendre   int__add__rj   rk   ri   rL   rn   )r   r   s   &*r   r   ZAbstractReducer.__init__  s\    bdff~.dkk"$=>ckk"$=>""O4/r   rc   N)r   r   r   r   r   r   r   r   r6   r;   sysplatformr1   r+   r$   rQ   rT   r[   ra   re   rf   rn   rm   r   r!   r"   rE   rF   r   rr   rr      st       $NHDKK
||w#		#N 9'#N%O0 0r   rr   )Z	metaclass)r6   r;   r   r   r   r   )r$   r+   r1   r<   )r[   rQ   rT   )-Zabcr    r   rj   r   r=   r    rL   rv   r]   r   Z__all__rw   Zhasattrr\   ZPicklerr   r   r   r&   r+   r1   r6   r;   Zobjectr$   rJ   rQ   rT   r[   ra   rb   r   rd   re   rS   rs   rt   ru   ri   rf   rk   rn   rm   rr   rc   r   r   <module>rx      s      	 	   
 
N LLG+ 8 8VZ0 7 7V\27 7V]]I6 V^^ . ""- <<799G
;$(
;
7
$*F *F ..GH4>!
$
	G:
  	bdff~ &1 dkk	5 6 ckk	5 6@6 		O , <<70V]]N+@= V]]N+0 0r   