diff options
author | Larry Hastings <larry@hastings.org> | 2015-02-26 05:58:48 -0800 |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2015-02-26 05:58:48 -0800 |
commit | 8c3ec536e924002dc3afe4ff92e32fe9ed82ebab (patch) | |
tree | f141eec287584ba9d58d32461e1a7d92b5466e91 /Lib/asyncio/base_subprocess.py | |
parent | e287746401398ee81c8e8a1513a5fe828eb32559 (diff) | |
parent | 7b2c3c6840052ea6f8b41253faf38b9e24f9a453 (diff) | |
download | cpython-git-8c3ec536e924002dc3afe4ff92e32fe9ed82ebab.tar.gz |
Merge 3.4.3 release engineering changes back into 3.4.
Diffstat (limited to 'Lib/asyncio/base_subprocess.py')
-rw-r--r-- | Lib/asyncio/base_subprocess.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py index 02b9e89f70..f56873fbea 100644 --- a/Lib/asyncio/base_subprocess.py +++ b/Lib/asyncio/base_subprocess.py @@ -57,6 +57,8 @@ class BaseSubprocessTransport(transports.SubprocessTransport): info.append('pid=%s' % self._pid) if self._returncode is not None: info.append('returncode=%s' % self._returncode) + else: + info.append('running') stdin = self._pipes.get(0) if stdin is not None: @@ -93,7 +95,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) |