From: Zac Medico Date: Thu, 9 Feb 2012 05:17:18 +0000 (-0800) Subject: MergeProcess: handle POLLHUP from elog pipe X-Git-Tag: v2.2.0_alpha86~31 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7092cf7fcbd1c51bd739110baaea9da011c5ebf5;p=portage.git MergeProcess: handle POLLHUP from elog pipe --- 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):