Current File : //opt/imh-python/lib/python2.7/test/fork_wait.pyc |
�
��Wc @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l j Z e j d � Z d Z d Z
d Z d e j f d � � YZ
d S( s� This 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.
While BeOS doesn't officially support fork and native threading in
the same application, the present example should work just fine. DC
i����Nt threadi g �?i t ForkWaitc B s, e Z d � Z d � Z d � Z d � Z RS( c C s i | _ d | _ d S( Ni ( t alivet stop( t self( ( sg /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/fork_wait.pyt setUp s c C sL xE | j sG t j � | j | <y t j t � Wq t k
rC q Xq Wd S( N( R t ost getpidR t timet sleept
SHORTSLEEPt IOError( R t id( ( sg /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/fork_wait.pyt f s
c C s� xP t d � D]B } t j | t j � \ } } | | k r>