mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Issue #23242: asyncio.SubprocessStreamProtocol now closes the subprocess
transport at subprocess exit. Clear also its reference to the transport.
This commit is contained in:
parent
72bdefb086
commit
791009bb89
1 changed files with 4 additions and 1 deletions
|
@ -94,8 +94,11 @@ class SubprocessStreamProtocol(streams.FlowControlMixin,
|
|||
reader.set_exception(exc)
|
||||
|
||||
def process_exited(self):
|
||||
# wake up futures waiting for wait()
|
||||
returncode = self._transport.get_returncode()
|
||||
self._transport.close()
|
||||
self._transport = None
|
||||
|
||||
# wake up futures waiting for wait()
|
||||
while self._waiters:
|
||||
waiter = self._waiters.popleft()
|
||||
if not waiter.cancelled():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue