Skip to content

Commit 2292edf

Browse files
committed
Merge 3.5 (issue python#26741)
2 parents 5a48e21 + b0d43ce commit 2292edf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/asyncio/base_subprocess.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ def _process_exited(self, returncode):
211211
logger.info('%r exited with return code %r',
212212
self, returncode)
213213
self._returncode = returncode
214+
if self._proc.returncode is None:
215+
# asyncio uses a child watcher: copy the status into the Popen
216+
# object. On Python 3.6, it is required to avoid a ResourceWarning.
217+
self._proc.returncode = returncode
214218
self._call(self._protocol.process_exited)
215219
self._try_finish()
216220

0 commit comments

Comments
 (0)