(self, cpid, *, exitcode)
| 16 | |
| 17 | class Wait4Test(ForkWait): |
| 18 | def wait_impl(self, cpid, *, exitcode): |
| 19 | option = os.WNOHANG |
| 20 | if sys.platform.startswith('aix'): |
| 21 | # Issue #11185: wait4 is broken on AIX and will always return 0 |
| 22 | # with WNOHANG. |
| 23 | option = 0 |
| 24 | for _ in support.sleeping_retry(support.SHORT_TIMEOUT): |
| 25 | # wait4() shouldn't hang, but some of the buildbots seem to hang |
| 26 | # in the forking tests. This is an attempt to fix the problem. |
| 27 | spid, status, rusage = os.wait4(cpid, option) |
| 28 | if spid == cpid: |
| 29 | break |
| 30 | self.assertEqual(spid, cpid) |
| 31 | self.assertEqual(os.waitstatus_to_exitcode(status), exitcode) |
| 32 | self.assertTrue(rusage) |
| 33 | |
| 34 | def tearDownModule(): |
| 35 | support.reap_children() |
nothing calls this directly
no test coverage detected