Handle native exited-child errors during private cleanup
This commit is contained in:
1 parent
5c0f6a3fd3
commit
f26e868bfc
2 files changed
+31
-2
No files matched your search
@@ -290,8 +290,13 @@ class _Win32Process:
|
||||
try:
|
||||
self._descendant_handles.append(self._open_process(0x100000, False, pid))
|
||||
self._descendant_pids.add(pid)
|
||||
except OSError as error:
|
||||
if getattr(error, 'winerror', error.args[0]) != 87:
|
||||
except Exception as error:
|
||||
# pywintypes.error is not an OSError. A child that exited
|
||||
# between the job snapshot and OpenProcess reports error 87.
|
||||
code = getattr(error, 'winerror', None)
|
||||
if code is None and error.args:
|
||||
code = error.args[0]
|
||||
if code != 87:
|
||||
raise
|
||||
|
||||
def close(self):
|
||||
|
||||
Reference in new issue
Block a user