mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
asyncio: BaseSubprocessTransport._kill_wait() now also call close()
close() closes pipes, which is not None yet by _kill_wait().
This commit is contained in:
parent
702dada2c5
commit
7b5a900e88
1 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue