From c353d7558327de461cdd4a2cc73dbd9d6ad6698a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 15 Jan 2015 12:52:05 +0100 Subject: Python issue #23242: SubprocessStreamProtocol now closes the subprocess transport at subprocess exit. Clear also its reference to the transport. --- asyncio/subprocess.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/asyncio/subprocess.py b/asyncio/subprocess.py index a028339..c848a21 100644 --- a/asyncio/subprocess.py +++ b/asyncio/subprocess.py @@ -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(): -- cgit v1.2.1