Changeset 391 for python/trunk/Lib/test/test_wait4.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/test/test_wait4.py
r2 r391 4 4 import os 5 5 import time 6 import sys 6 7 from test.fork_wait import ForkWait 7 from test.test_support import TestSkipped, run_unittest, reap_children8 from test.test_support import run_unittest, reap_children, get_attribute 8 9 9 try: 10 os.fork 11 except AttributeError: 12 raise TestSkipped, "os.fork not defined -- skipping test_wait4" 10 # If either of these do not exist, skip this test. 11 get_attribute(os, 'fork') 12 get_attribute(os, 'wait4') 13 13 14 try:15 os.wait416 except AttributeError:17 raise TestSkipped, "os.wait4 not defined -- skipping test_wait4"18 14 19 15 class Wait4Test(ForkWait): 20 16 def wait_impl(self, cpid): 17 option = os.WNOHANG 18 if sys.platform.startswith('aix'): 19 # Issue #11185: wait4 is broken on AIX and will always return 0 20 # with WNOHANG. 21 option = 0 21 22 for i in range(10): 22 23 # wait4() shouldn't hang, but some of the buildbots seem to hang 23 24 # in the forking tests. This is an attempt to fix the problem. 24 spid, status, rusage = os.wait4(cpid, o s.WNOHANG)25 spid, status, rusage = os.wait4(cpid, option) 25 26 if spid == cpid: 26 27 break
Note:
See TracChangeset
for help on using the changeset viewer.