Skip to content

Commit 8f47ec5

Browse files
[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 9cb8c52) Co-authored-by: Victor Stinner <[email protected]>
1 parent a9c0082 commit 8f47ec5

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
@@ -115,7 +115,12 @@ def _stop_locked(
115115
close(self._fd)
116116
self._fd = None
117117

118-
_, status = waitpid(self._pid, 0)
118+
try:
119+
_, status = waitpid(self._pid, 0)
120+
except ChildProcessError:
121+
self._pid = None
122+
self._exitcode = None
123+
return
119124

120125
self._pid = None
121126

0 commit comments

Comments
 (0)