diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-15 12:52:05 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-15 12:52:05 +0100 |
| commit | 3ce21be63a0a481c56958749b4aa46665b212387 (patch) | |
| tree | 2ea5c7cd19170da2b9c1aa12ef34c4697015f045 | |
| parent | 1da6e1d82c7a466d7d14b928b0f2b1fa568f6417 (diff) | |
| download | trollius-git-3ce21be63a0a481c56958749b4aa46665b212387.tar.gz | |
Python issue #23242: SubprocessStreamProtocol now closes the subprocess
transport at subprocess exit.
Clear also its reference to the transport.
| -rw-r--r-- | asyncio/subprocess.py | 5 |
1 files changed, 4 insertions, 1 deletions
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(): |
