summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-29 01:14:30 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-29 01:14:30 (GMT)
commit7b5a900e88a046b01eebafdc98ee23d531c101d3 (patch)
tree69413dc150b215a5bd8358a0713a82fa97d1d15c /Lib/asyncio
parent702dada2c5f0f3e65bef4e086f4967cbe1efbb36 (diff)
downloadcpython-7b5a900e88a046b01eebafdc98ee23d531c101d3.zip
cpython-7b5a900e88a046b01eebafdc98ee23d531c101d3.tar.gz
cpython-7b5a900e88a046b01eebafdc98ee23d531c101d3.tar.bz2
asyncio: BaseSubprocessTransport._kill_wait() now also call close()
close() closes pipes, which is not None yet by _kill_wait().
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/base_subprocess.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py
index f5e7dfe..81c6f1a 100644
--- a/Lib/asyncio/base_subprocess.py
+++ b/Lib/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: