python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_fork1.cpython-311.opt-1.pyc

e8
dZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZej
sejdGdde
ZdZed	krejdSdS)
z.This test checks for correct fork() behavior.
N)ForkWait)supportz$test module requires working os.forkceZdZdZdZdS)ForkTestc	tjdd	d	fd}tj|}|d}tj}	|s^t}|krtj|n_tj
dkrtdtjdn+||
||		tj|tjd
S#t"$rYd
SwxYw#	tj|tjw#t"$rYwwxYwxYw)zFCheck fork() in main thread works while a subthread is doing an importzfake test modulepartialcompletectjtj<tjdtj<tjdS)Ng{Gz?)impacquire_locksysmodulessettimesleeprelease_lock)complete_modulefake_module_nameimport_startedpartial_modulesC/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_fork1.pyimporterz9ForkTest.test_threaded_import_lock_fork.<locals>.importersc,:CK()   Jt,;CK())target*z Child encountered partial moduleexitcodeN)	threadingEventThreadstartwaitosfork
__import___exitrverboseprintjoin	wait_implkillsignalSIGKILLOSError)
selfrtrpidmrrrrs
      @@@@rtest_threaded_import_lock_forkz'ForkTest.test_threaded_import_lock_forks"**-"$								
H---				gii	

7/00''HX&&&&**@AAAHQKKKKsX666
V^,,,,,




V^,,,,



sC9BD7D&&
D43D47E)9EE)
E&#E)%E&&E)cTdfd}tdD]
}||dS)zJCheck fork() in main thread works while the main thread is doing an importrcd}d}		t|D]}tj|dz
}tj}|}t|D]}tjn*#t|D]}tjwxYwnD#t$r7|r3tjdkrtdtj
dwxYw|rtj
|dS)NrFrzRuntimeError in childr)rangerrr$r%rRuntimeErrorrr(r)r'r+)levelreleasein_childir2rr0s     rfork_with_import_lockzDForkTest.test_nested_import_lock_fork.<locals>.fork_with_import_lockEs=GH
+"5\\%%(***1'))C#&wH"7^^++(****+U7^^++(****++


 **5666HQKKK

#"""NN3N22222sAA.&B.'BBACN)r7)r0r=r9rs`  @rtest_nested_import_lock_forkz%ForkTest.test_nested_import_lock_forkAs\	3	3	3	3	3	321XX	)	)E!!%((((	)	)rN)__name__
__module____qualname__r4r?rrrrs3(((V)))))rrc,tjdS)N)r
reap_childrenrCrrtearDownModulerFbsr__main__)__doc___imprr$r-r
rrunittesttest.fork_waitrtestrhas_fork_supportSkipTestrrFr@mainrCrr<module>rPs				







######D
(
B
C
CCJ)J)J)J)J)xJ)J)J)ZzHMOOOOOr