+
    Bi8                         R 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IHt ]P                  '       g   ]P                  ! R4      h ! R R]
4      tR t]R8X  d   ]P$                  ! 4        R# R# )	z.This test checks for correct fork() behavior.
N)ForkWait)supportz$test module requires working os.forkc                   ,   a  ] tR t^t o R tR tRtV tR# )ForkTestc                  aaaa	 \         P                  ! 4       oRoRo	RoVVVV	3R lp\         P                  ! VR7      pVP                  4        SP	                  4        ^*p\
        P                  ! 4       p V'       ga   \        S4      pVS8X  d   \
        P                  ! V4       MY\        P                  ^8  d   \        R4       \
        P                  ! ^4       M"VP                  4        V P                  WCR7        \
        P                  ! V\        P                   4       R#   \"         d     R# i ; i   \
        P                  ! T\        P                   4       i   \"         d     i i ; i; i)	zFCheck fork() in main thread works while a subthread is doing an importzfake test modulepartialcompletec                     < \         P                  ! 4        S\        P                  S&   SP	                  4        \
        P                  ! R 4       S \        P                  S&   \         P                  ! 4        R# )g{Gz?N)impacquire_locksysmodulessettimesleeprelease_lock)complete_modulefake_module_nameimport_startedpartial_modules   &/usr/lib/python3.14/test/test_fork1.pyimporter9ForkTest.test_threaded_import_lock_fork.<locals>.importer   sQ    ,:CKK() JJt,;CKK()    )targetz Child encountered partial moduleexitcodeN)	threadingEventThreadstartwaitosfork
__import___exitr   verboseprintjoin	wait_implkillsignalSIGKILLOSError)
selfr   tr   pidmr   r   r   r   s
   &     @@@@r   test_threaded_import_lock_fork'ForkTest.test_threaded_import_lock_fork   s   "*-"$	 	 H-		ggi	 /0'HHX&*@AHHQK s6V^^, V^^, sI   8D<  BD< %D* *D98D9<E5>%E$#E5$E2/E51E22E5c                P   a a ^*oVV 3R lp\        ^4       F  pV! V4       K  	  R# )zJCheck fork() in main thread works while the main thread is doing an importc                 P  < ^ pRp  \        V 4       F!  p\        P                  ! 4        V^,          pK#  	  \        P                  ! 4       pV'       * p\        V4       F  p\        P
                  ! 4        K  	  T'       d   \        P                  ! S4       SP                  TSR7       R#   \        T4       F  p\        P
                  ! 4        K  	  i ; i  \         dA    T'       d7   \        P                  ^8  d   \        R4       \        P                  ! ^4       h i ; i)    FzRuntimeError in childr   N)ranger
   r   r"   r#   r   RuntimeErrorr   r&   r'   r%   r)   )levelreleasein_childir0   r   r.   s   &    r   fork_with_import_lockDForkTest.test_nested_import_lock_fork.<locals>.fork_with_import_lockE   s    GH+"5\((*1 * '')C#&wH"7^((* , "NN3N2 #7^((* , *56HHQKs$   AB. 'C .)CC D%-8D%N)r7   )r.   r=   r9   r   s   f  @r   test_nested_import_lock_fork%ForkTest.test_nested_import_lock_forkA   s%    	32 1XE!%( r    N)__name__
__module____qualname____firstlineno__r2   r?   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s     (V) )r   r   c                  0    \         P                  ! 4        R # )N)r   reap_childrenrA   r   r   tearDownModulerK   b   s    r   __main__)__doc___impr
   r"   r+   r   r   r   unittesttest.fork_waitr   testr   has_fork_supportSkipTestr   rK   rB   mainrA   r   r   <module>rU      ss     	  
    #  


B
CCJ)x J)Z zMMO r   