Skip to content

Commit d557255

Browse files
[3.15] gh-160295: Fix race in test_forkserver_sigkill (GH-160296) (#160508)
Co-authored-by: Davi de Jesus <davidejesus.log@proton.me>
1 parent 47ec308 commit d557255

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎Lib/test/_test_multiprocessing.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,9 @@ def check_forkserver_death(self, signum):
993993
self.assertEqual(proc2.exitcode, 0)
994994

995995
proc.join()
996-
self.assertTrue(evt.is_set())
996+
# After SIGKILL, join() can return (exitcode 255) as soon as the
997+
# status pipe is closed, before the orphaned child has run.
998+
self.assertTrue(evt.wait(support.SHORT_TIMEOUT))
997999
self.assertIn(proc.exitcode, (0, 255))
9981000

9991001
def test_forkserver_sigint(self):

0 commit comments

Comments
 (0)