1 |
commit: 03a635e3a95fbe4afc6fb2fae2e56c03ef946933 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 26 07:40:05 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 26 08:01:05 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=03a635e3 |
7 |
|
8 |
AbstractPollTask._unregister_if_appropriate: use _async_wait() (bug 591760) |
9 |
|
10 |
Use _async_wait() to avoid event loop recursion. This change |
11 |
only affects PipeLogger, PipeReader, and FifoWriter, since other |
12 |
subclasses inherit the Subprocess implementation that was fixed |
13 |
in commit c5ab0696cec1f0f020d2d8ad416f9b1444a467de. |
14 |
|
15 |
Bug: https://bugs.gentoo.org/591760 |
16 |
|
17 |
pym/_emerge/AbstractPollTask.py | 6 ++++-- |
18 |
1 file changed, 4 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTask.py |
21 |
index aa8fc6593..d2965cc31 100644 |
22 |
--- a/pym/_emerge/AbstractPollTask.py |
23 |
+++ b/pym/_emerge/AbstractPollTask.py |
24 |
@@ -128,10 +128,12 @@ class AbstractPollTask(AsynchronousTask): |
25 |
self._log_poll_exception(event) |
26 |
self._unregister() |
27 |
self.cancel() |
28 |
- self.wait() |
29 |
+ self.returncode = self.returncode or os.EX_OK |
30 |
+ self._async_wait() |
31 |
elif event & self.scheduler.IO_HUP: |
32 |
self._unregister() |
33 |
- self.wait() |
34 |
+ self.returncode = self.returncode or os.EX_OK |
35 |
+ self._async_wait() |
36 |
|
37 |
def _wait(self): |
38 |
if self.returncode is not None: |