python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
fork_wait.cpython-312.opt-1.pyc

͑e-	~dZddlZddlZddlZddlZddlmZddlmZddl	Z	dZ
dZdZGdd	ejZy)
arThis test case provides support for checking forking and wait behavior.

To test different wait behavior, override the wait_impl method.

We want fork1() semantics -- only the forking thread survives in the
child after a fork().

On some systems (e.g. Solaris without posix threads) we find that all
active threads survive in the child after a fork(); this is an error.
N)support)threading_helperg?c*eZdZdZdZdZdZdZy)ForkWaitc`tj|_i|_d|_g|_y)Nr)rthreading_setup_threading_keyalivestopthreads)selfs B/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/fork_wait.pysetUpzForkWait.setUps(.>>@
	cd|_|jD]}|jd}|jjt	j
|jy)N)r
rjoinclearrthreading_cleanupr)rthreads  rtearDownzForkWait.tearDownsN	ll	FKKM	**D,?,?@rc|jsItj|j|<	t	j
t|jsHyy#t$rYwxYw)N)r
osgetpidrtimesleep
SHORTSLEEPOSError)rids  rfz
ForkWait.f(sJ))YY[DJJrN


:&))

sA	A#"A#c2tj||y)Nexitcode)rwait_process)rcpidr%s   r	wait_implzForkWait.wait_impl0sTH5rcttD]O}tj|j|f}|j|jj|QtjtjD] }t|jtk\s nt|jj}|j|t!tt|jj#}t%j&t(d5t+j,x}dk(r]t/j0t2d}|jD]}|j|||k7s|dz
}t+j4|n|j7|ddddy#1swYyxYw)N)targetargsignore)categoryactionrrr$)rangeNUM_THREADS	threadingThreadr"startrappendrsleeping_retry
SHORT_TIMEOUTlenrsortedkeysassertEquallistcopywarningscatch_warningsDeprecationWarningrforkrr	LONGSLEEP_exitr()	rir_a
prefork_livesr'nkeys	         r	test_waitzForkWait.test_wait3s^{#	(A%%TVV1$?FLLNLL'	(''(=(=>	A4::+-	
4::??$%D{!345

)

$
$.@,46	1	!a'

9%::Czz#-*<<Qta0	1	1	1s(AF;0F;;GN)__name__
__module____qualname__rrr"r(rIrrrrsA61rr)__doc__rrunittestr1testrtest.supportrr=rArr0TestCaserrMrr<module>rSsA	)
	

91x  91r