diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py index 71db8d69668..8026de187d5 100644 --- a/Lib/test/libregrtest/runtest_mp.py +++ b/Lib/test/libregrtest/runtest_mp.py @@ -152,6 +152,11 @@ def _kill(self): print(f"Kill {self}", file=sys.stderr, flush=True) try: popen.kill() + except ProcessLookupError: + # Process completed, the TestWorkerProcess thread read its exit + # status, but Popen.send_signal() read the returncode just before + # Popen.wait() set returncode. + pass except OSError as exc: print_warning(f"Failed to kill {self}: {exc!r}")