summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-05-20 11:06:55 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-05-20 11:06:55 (GMT)
commit2292edf574f2fcf630c81f0c3348692f18dc4e42 (patch)
tree0d3f6076e19a9ce6d9409a116527b5493db3a8de /Lib
parent5a48e21ff163107a6f1788050b2f1ffc8bce2b6d (diff)
parentb0d43ce890adbcfea2e1dff7ba6e76c5c046b61c (diff)
downloadcpython-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.py4
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()