@@ -470,13 +470,15 @@ def test_is_alive_after_fork(self): |
|
|
470 |
470 |
for i in range(20): |
471 |
471 |
t = threading.Thread(target=lambda: None) |
472 |
472 |
t.start() |
473 |
|
-self.addCleanup(t.join) |
474 |
473 |
pid = os.fork() |
475 |
474 |
if pid == 0: |
476 |
|
-os._exit(1 if t.is_alive() else 0) |
|
475 |
+os._exit(11 if t.is_alive() else 10) |
477 |
476 |
else: |
|
477 |
+t.join() |
|
478 |
+ |
478 |
479 |
pid, status = os.waitpid(pid, 0) |
479 |
|
-self.assertEqual(0, status) |
|
480 |
+self.assertTrue(os.WIFEXITED(status)) |
|
481 |
+self.assertEqual(10, os.WEXITSTATUS(status)) |
480 |
482 |
|
481 |
483 |
def test_main_thread(self): |
482 |
484 |
main = threading.main_thread() |