Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 6 additions & 1 deletion Lib/asyncio/base_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ def close(self):
for proto in self._pipes.values():
if proto is None:
continue
proto.pipe.close()
# See https://github.com/python/cpython/issues/114177
Comment thread
kumaraditya303 marked this conversation as resolved.
Outdated
# skip closing the pipe if loop is already closed
# this can happen e.g. when loop is closed immediately after
# process is killed
if self._loop and not self._loop.is_closed():
proto.pipe.close()

if (self._proc is not None and
# has the child process finished?
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix :mod:`asyncio` to not close subprocess pipes which would otherwise error out when the event loop is already closed.
Loading