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