diff options
author | Gregory P. Smith <greg@krypto.org> | 2017-01-22 17:29:44 -0800 |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2017-01-22 17:29:44 -0800 |
commit | d71a238820a6e746c7bb1995d8f236b40904924d (patch) | |
tree | 1da08aa6698b4a9dcaa5e90d9541b78ac11e1650 /Lib/asyncio/windows_events.py | |
parent | d49be132fb4eb2d302592ebd84fafc4a1c98e531 (diff) | |
parent | 424881df2c661ba4238f9f56f273a5f4974f74d4 (diff) | |
download | cpython-d71a238820a6e746c7bb1995d8f236b40904924d.tar.gz |
Issue #29335: Fix subprocess.Popen.wait() when the child process has
exited to a stopped instead of terminated state (ex: when under ptrace).
Diffstat (limited to 'Lib/asyncio/windows_events.py')
-rw-r--r-- | Lib/asyncio/windows_events.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py index 668fe1451b..b777dd065a 100644 --- a/Lib/asyncio/windows_events.py +++ b/Lib/asyncio/windows_events.py @@ -171,8 +171,13 @@ class _WaitCancelFuture(_BaseWaitHandleFuture): def cancel(self): raise RuntimeError("_WaitCancelFuture must not be cancelled") - def _schedule_callbacks(self): - super(_WaitCancelFuture, self)._schedule_callbacks() + def set_result(self, result): + super().set_result(result) + if self._done_callback is not None: + self._done_callback(self) + + def set_exception(self, exception): + super().set_exception(exception) if self._done_callback is not None: self._done_callback(self) |