changeset: 94165:df493e9c6821 branch: 3.4 parent: 94163:3c37825d85d3 user: Victor Stinner date: Thu Jan 15 13:16:02 2015 +0100 files: Lib/asyncio/subprocess.py description: Issue #23242: asyncio.SubprocessStreamProtocol now closes the subprocess transport at subprocess exit. Clear also its reference to the transport. diff -r 3c37825d85d3 -r df493e9c6821 Lib/asyncio/subprocess.py --- a/Lib/asyncio/subprocess.py Thu Jan 15 09:44:13 2015 +0100 +++ b/Lib/asyncio/subprocess.py Thu Jan 15 13:16:02 2015 +0100 @@ -94,8 +94,11 @@ reader.set_exception(exc) def process_exited(self): + returncode = self._transport.get_returncode() + self._transport.close() + self._transport = None + # wake up futures waiting for wait() - returncode = self._transport.get_returncode() while self._waiters: waiter = self._waiters.popleft() if not waiter.cancelled():