Skip to content

Commit 3bb7cbf

Browse files
[3.14] gh-160295: Fix race in test_forkserver_sigkill (GH-160296) (#160509)
Co-authored-by: Davi de Jesus <davidejesus.log@proton.me>
1 parent 091ef83 commit 3bb7cbf

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
@@ -972,7 +972,9 @@ def check_forkserver_death(self, signum):
972972
self.assertEqual(proc2.exitcode, 0)
973973

974974
proc.join()
975-
self.assertTrue(evt.is_set())
975+
# After SIGKILL, join() can return (exitcode 255) as soon as the
976+
# status pipe is closed, before the orphaned child has run.
977+
self.assertTrue(evt.wait(support.SHORT_TIMEOUT))
976978
self.assertIn(proc.exitcode, (0, 255))
977979

978980
def test_forkserver_sigint(self):

0 commit comments

Comments
 (0)