https://github.com/python/cpython/commit/9cb8c52d5e9a83efe4fa3878db06befd9df52f54
commit: 9cb8c52d5e9a83efe4fa3878db06befd9df52f54
branch: main
author: Victor Stinner <[email protected]>
committer: gpshead <[email protected]>
date: 2025-11-10T20:59:16-08:00
summary:
gh-140485: Catch ChildProcessError in multiprocessing resource tracker
(GH-141132)
files:
M Lib/multiprocessing/resource_tracker.py
diff --git a/Lib/multiprocessing/resource_tracker.py
b/Lib/multiprocessing/resource_tracker.py
index c53092f6e34b32..38fcaed48fa9fb 100644
--- a/Lib/multiprocessing/resource_tracker.py
+++ b/Lib/multiprocessing/resource_tracker.py
@@ -111,7 +111,12 @@ def _stop_locked(
close(self._fd)
self._fd = None
- _, status = waitpid(self._pid, 0)
+ try:
+ _, status = waitpid(self._pid, 0)
+ except ChildProcessError:
+ self._pid = None
+ self._exitcode = None
+ return
self._pid = None
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]