Commit e6cfdefa authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-31510: Fix multiprocessing test_many_processes() on macOS (#3857)

On macOS, a process can exit with -SIGKILL if it is killed "early"
with SIGTERM.
parent 4337a0d9
......@@ -501,8 +501,13 @@ class _TestProcess(BaseTestCase):
for p in procs:
join_process(p)
if os.name != 'nt':
exitcodes = [-signal.SIGTERM]
if sys.platform == 'darwin':
# bpo-31510: On macOS, killing a freshly started process with
# SIGTERM sometimes kills the process with SIGKILL.
exitcodes.append(-signal.SIGKILL)
for p in procs:
self.assertEqual(p.exitcode, -signal.SIGTERM)
self.assertIn(p.exitcode, exitcodes)
def test_lose_target_ref(self):
c = DummyCallable()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment