summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-29 01:59:57 +0100
committerVictor Stinner <victor.stinner@gmail.com>2015-01-29 01:59:57 +0100
commitdadbeb9345a1d299b443df17551451405723c970 (patch)
treebafdd3d06accc06952e99e26ddafb749db9163a8
parent6086246f41854b44ef1789fbfdaa167689c63f42 (diff)
downloadtrollius-dadbeb9345a1d299b443df17551451405723c970.tar.gz
BaseSubprocessTransport._kill_wait() now also call close()
close() closes pipes, which is not None yet by _kill_wait().
-rw-r--r--asyncio/base_subprocess.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/asyncio/base_subprocess.py b/asyncio/base_subprocess.py
index f5e7dfe..81c6f1a 100644
--- a/asyncio/base_subprocess.py
+++ b/asyncio/base_subprocess.py
@@ -117,12 +117,15 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
proc.stderr.close()
if proc.stdin:
proc.stdin.close()
+
try:
proc.kill()
except ProcessLookupError:
pass
self._returncode = proc.wait()
+ self.close()
+
@coroutine
def _post_init(self):
try: