https://github.com/python/cpython/commit/8f47ec58f6be6bfd41bf1af541c1edad4589f621 commit: 8f47ec58f6be6bfd41bf1af541c1edad4589f621 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: gpshead <[email protected]> date: 2025-11-11T05:21:20Z summary:
[3.13] gh-140485: Catch ChildProcessError in multiprocessing resource tracker (GH-141132) (#141385) gh-140485: Catch ChildProcessError in multiprocessing resource tracker (GH-141132) (cherry picked from commit 9cb8c52d5e9a83efe4fa3878db06befd9df52f54) Co-authored-by: Victor Stinner <[email protected]> files: M Lib/multiprocessing/resource_tracker.py diff --git a/Lib/multiprocessing/resource_tracker.py b/Lib/multiprocessing/resource_tracker.py index 2249948da98b00..2ffbe532cdee50 100644 --- a/Lib/multiprocessing/resource_tracker.py +++ b/Lib/multiprocessing/resource_tracker.py @@ -115,7 +115,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]
