Commit 7b5a900e authored by Victor Stinner's avatar Victor Stinner

asyncio: BaseSubprocessTransport._kill_wait() now also call close()

close() closes pipes, which is not None yet by _kill_wait().
parent 702dada2
...@@ -117,12 +117,15 @@ class BaseSubprocessTransport(transports.SubprocessTransport): ...@@ -117,12 +117,15 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
proc.stderr.close() proc.stderr.close()
if proc.stdin: if proc.stdin:
proc.stdin.close() proc.stdin.close()
try: try:
proc.kill() proc.kill()
except ProcessLookupError: except ProcessLookupError:
pass pass
self._returncode = proc.wait() self._returncode = proc.wait()
self.close()
@coroutine @coroutine
def _post_init(self): def _post_init(self):
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment