Commit 791009bb authored by Victor Stinner's avatar Victor Stinner

Issue #23242: asyncio.SubprocessStreamProtocol now closes the subprocess

transport at subprocess exit.

Clear also its reference to the transport.
parent 72bdefb0
......@@ -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():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment