We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87c8f9b commit d50af4eCopy full SHA for d50af4e
1 file changed
Lib/multiprocessing/resource_tracker.py
@@ -122,11 +122,12 @@ def _after_fork_in_child(self):
122
self._exitcode = None
123
if (self._fd is not None and
124
not getattr(_fork_intent, 'preserve_fd', False)):
125
+ fd = self._fd
126
+ self._fd = None
127
try:
- os.close(self._fd)
128
+ os.close(fd)
129
except OSError:
130
pass
- self._fd = None
131
132
def _stop(self, use_blocking_lock=True, wait_timeout=None):
133
if use_blocking_lock:
0 commit comments