-í
é¶<c       sØ     d  Z    d k Z d k Z d k Z d k Z  d k l Z l Z l Z  y  e i	 Wn"  e
 j
 o  e d ‚ n X d Z  d Z  d Z  h  Z  d a  d „  Z ' d	 „  Z K e ƒ  d S(
   s   This test checks for correct fork() behavior.

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
N(   s   verifys   verboses   TestSkippeds*   os.fork not defined -- skipping test_fork1i   f0.5i   i    c    sc      xV   t  oJ ! t i ƒ  t |  <" y # t i t ƒ Wn $ t j
 o
 % n Xq	 Wd  S(   N(	   s   stops   oss   getpids   alives   ids   times   sleeps
   SHORTSLEEPs   IOError(   s   id(    (    s%   /usr/lib/python2.2/test/test_fork1.pys   f s    c     sÂ  ' ( x- t  t ƒ D( ] } ) t i t | f ƒ q W+ t i t ƒ - t	 i
 ƒ  }  . |  i ƒ  / t |  t  t ƒ j ƒ 1 t	 i ƒ  } 3 t i d g j o 4 t i ƒ  } n 6 t i ƒ  } 8 | d j os : t i t ƒ ; d } < x@ t	 i
 ƒ  D< ]/ } = t	 | | | j o > | d } n qû W? t i | ƒ nz B t i | d ƒ \ } } C t | | j ƒ D t | d j E d | d @| d ?f ƒ F H d a I t i d t ƒ d  S(   Ns	   unixware7i    i   s   cause = %d, exit = %diÿ   i   i   (   s   ranges   NUM_THREADSs   is   threads	   start_news   fs   times   sleeps	   LONGSLEEPs   alives   keyss   as   sorts   verifys   copys   prefork_livess   syss   platforms   oss   fork1s   cpids   forks   ns   keys   _exits   waitpids   spids   statuss   stops
   SHORTSLEEP(   s   as   spids   cpids   is   prefork_livess   ns   statuss   key(    (    s%   /usr/lib/python2.2/test/test_fork1.pys   main' s4    		 		(   s   __doc__s   oss   syss   times   threads   test_supports   verifys   verboses   TestSkippeds   forks   AttributeErrors	   LONGSLEEPs
   SHORTSLEEPs   NUM_THREADSs   alives   stops   fs   main(   s   NUM_THREADSs	   LONGSLEEPs   TestSkippeds   verboses   threads   fs   verifys   alives
   SHORTSLEEPs   syss   times   mains   os(    (    s%   /usr/lib/python2.2/test/test_fork1.pys   ? s   '					$