from test.fork_wait import ForkWait
from test.test_support import TestSkipped, run_unittest, reap_children
def wait_impl(self, cpid):
- spid, status, rusage = os.wait4(cpid, 0)
+ # wait4() shouldn't hang, but some of the buildbots seem to hang
+ # in the forking tests. This is an attempt to fix the problem.
+ spid, status, rusage = os.wait4(cpid, os.WNOHANG)
self.assertEqual(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8))