From 7092cf7fcbd1c51bd739110baaea9da011c5ebf5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 8 Feb 2012 21:17:18 -0800 Subject: [PATCH] MergeProcess: handle POLLHUP from elog pipe --- pym/portage/dbapi/_MergeProcess.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py index eed7bd45f..da278ea2a 100644 --- a/pym/portage/dbapi/_MergeProcess.py +++ b/pym/portage/dbapi/_MergeProcess.py @@ -83,6 +83,13 @@ class MergeProcess(SpawnProcess): reporter = getattr(portage.elog.messages, funcname) reporter(msg, phase=phase, key=key, out=out) + if event & PollConstants.POLLHUP: + self.scheduler.unregister(self._elog_reg_id) + self._elog_reg_id = None + os.close(self._elog_reader_fd) + self._elog_reader_fd = None + return False + return True def _spawn(self, args, fd_pipes, **kwargs): -- 2.26.2