summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_subprocess.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/base_subprocess.py')
-rw-r--r--Lib/asyncio/base_subprocess.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py
index 02b9e89..5458ab1 100644
--- a/Lib/asyncio/base_subprocess.py
+++ b/Lib/asyncio/base_subprocess.py
@@ -93,7 +93,12 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
continue
proto.pipe.close()
- if self._proc is not None and self._returncode is None:
+ if (self._proc is not None
+ # the child process finished?
+ and self._returncode is None
+ # the child process finished but the transport was not notified yet?
+ and self._proc.poll() is None
+ ):
if self._loop.get_debug():
logger.warning('Close running child process: kill %r', self)