Skip to content

Commit ec836f2

Browse files
[3.14] gh-140485: Catch ChildProcessError in multiprocessing resource tracker (GH-141132) (#141384)
gh-140485: Catch ChildProcessError in multiprocessing resource tracker (GH-141132) (cherry picked from commit 9cb8c52) Co-authored-by: Victor Stinner <[email protected]>
1 parent 6d31d08 commit ec836f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Lib/multiprocessing/resource_tracker.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ def _stop_locked(
111111
close(self._fd)
112112
self._fd = None
113113

114-
_, status = waitpid(self._pid, 0)
114+
try:
115+
_, status = waitpid(self._pid, 0)
116+
except ChildProcessError:
117+
self._pid = None
118+
self._exitcode = None
119+
return
115120

116121
self._pid = None
117122

0 commit comments

Comments
 (0)