[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 9cb8c52d5e)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Miss Islington (bot) 2025-11-11 06:21:20 +01:00 committed by GitHub
parent a9c00827dd
commit 8f47ec58f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,7 +115,12 @@ class ResourceTracker(object):
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