diff --git a/Lib/test/libregrtest/run_workers.py b/Lib/test/libregrtest/run_workers.py index 1c94a15a1868bb6..6d18c2d668cf9c3 100644 --- a/Lib/test/libregrtest/run_workers.py +++ b/Lib/test/libregrtest/run_workers.py @@ -153,6 +153,9 @@ def _kill(self) -> None: # On OpenBSD getsid() is only allowed for a process in the # same session, so the failure means that it is not. use_killpg = True + except ProcessLookupError: + # The process completed in the meanwhile + return if use_killpg: what = f"{self} process group"