diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-05-20 11:06:55 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-05-20 11:06:55 (GMT) |
commit | 2292edf574f2fcf630c81f0c3348692f18dc4e42 (patch) | |
tree | 0d3f6076e19a9ce6d9409a116527b5493db3a8de /Lib | |
parent | 5a48e21ff163107a6f1788050b2f1ffc8bce2b6d (diff) | |
parent | b0d43ce890adbcfea2e1dff7ba6e76c5c046b61c (diff) | |
download | cpython-2292edf574f2fcf630c81f0c3348692f18dc4e42.zip cpython-2292edf574f2fcf630c81f0c3348692f18dc4e42.tar.gz cpython-2292edf574f2fcf630c81f0c3348692f18dc4e42.tar.bz2 |
Merge 3.5 (issue #26741)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asyncio/base_subprocess.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py index bf74e94..fb8c2ba 100644 --- a/Lib/asyncio/base_subprocess.py +++ b/Lib/asyncio/base_subprocess.py @@ -211,6 +211,10 @@ class BaseSubprocessTransport(transports.SubprocessTransport): logger.info('%r exited with return code %r', self, returncode) self._returncode = returncode + if self._proc.returncode is None: + # asyncio uses a child watcher: copy the status into the Popen + # object. On Python 3.6, it is required to avoid a ResourceWarning. + self._proc.returncode = returncode self._call(self._protocol.process_exited) self._try_finish() |