Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/asyncio/base_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def close(self):

try:
self._proc.kill()
except ProcessLookupError:
except (ProcessLookupError, PermissionError):
# the process may have already exited or may be running setuid
pass

# Don't clear the _proc reference yet: _post_init() may still run
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix :mod:`asyncio` ``SubprocessTransport.close()`` not to throw
``PermissionError`` when used with setuid executables.