bpo-37531: regrtest now catchs ProcessLookupError (GH-16827) · python/cpython@a661392

Original file line numberDiff line numberDiff line change

@@ -152,6 +152,11 @@ def _kill(self):

152152

print(f"Kill {self}", file=sys.stderr, flush=True)

153153

try:

154154

popen.kill()

155+

except ProcessLookupError:

156+

# Process completed, the TestWorkerProcess thread read its exit

157+

# status, but Popen.send_signal() read the returncode just before

158+

# Popen.wait() set returncode.

159+

pass

155160

except OSError as exc:

156161

print_warning(f"Failed to kill {self}: {exc!r}")

157162