commit: 03a635e3a95fbe4afc6fb2fae2e56c03ef946933 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Thu Apr 26 07:40:05 2018 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Thu Apr 26 08:01:05 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=03a635e3
AbstractPollTask._unregister_if_appropriate: use _async_wait() (bug 591760) Use _async_wait() to avoid event loop recursion. This change only affects PipeLogger, PipeReader, and FifoWriter, since other subclasses inherit the Subprocess implementation that was fixed in commit c5ab0696cec1f0f020d2d8ad416f9b1444a467de. Bug: https://bugs.gentoo.org/591760 pym/_emerge/AbstractPollTask.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTask.py index aa8fc6593..d2965cc31 100644 --- a/pym/_emerge/AbstractPollTask.py +++ b/pym/_emerge/AbstractPollTask.py @@ -128,10 +128,12 @@ class AbstractPollTask(AsynchronousTask): self._log_poll_exception(event) self._unregister() self.cancel() - self.wait() + self.returncode = self.returncode or os.EX_OK + self._async_wait() elif event & self.scheduler.IO_HUP: self._unregister() - self.wait() + self.returncode = self.returncode or os.EX_OK + self._async_wait() def _wait(self): if self.returncode is not None:
