summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-08-18 23:24:33 +0000
committerZac Medico <zmedico@gentoo.org>2008-08-18 23:24:33 +0000
commit7f7600ceae7d013cc8ad99ffa48866c28b804db6 (patch)
tree2fc3228fd130b2a0775b3df98784d870690d711c
parent87758b37e613d9dee0a224b82974a910a4265614 (diff)
downloadportage-7f7600ceae7d013cc8ad99ffa48866c28b804db6.tar.gz
portage-7f7600ceae7d013cc8ad99ffa48866c28b804db6.tar.bz2
portage-7f7600ceae7d013cc8ad99ffa48866c28b804db6.zip
The following error is known to occur with Linux kernel versions
less than 2.6.24: select.error: (4, 'Interrupted system call') This error has been observed after a SIGSTOP, followed by SIGCONT. Treat it similar to EAGAIN if timeout is None, otherwise just return without any events. Thanks to Jeremy Olexa <darkside@g.o> for reporting and testing this patch. svn path=/main/trunk/; revision=11436
-rw-r--r--pym/_emerge/__init__.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index cc1b42bef..2bb1d4428 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -8342,7 +8342,25 @@ class PollScheduler(object):
not self._poll_event_handlers:
raise StopIteration(
"timeout is None and there are no poll() event handlers")
- self._poll_event_queue.extend(self._poll_obj.poll(timeout))
+
+ # The following error is known to occur with Linux kernel versions
+ # less than 2.6.24:
+ #
+ # select.error: (4, 'Interrupted system call')
+ #
+ # This error has been observed after a SIGSTOP, followed by SIGCONT.
+ # Treat it similar to EAGAIN if timeout is None, otherwise just return
+ # without any events.
+ while True:
+ try:
+ self._poll_event_queue.extend(self._poll_obj.poll(timeout))
+ break
+ except select.error, e:
+ writemsg_level("\n!!! select error: %s\n" % (e,),
+ level=logging.ERROR, noiselevel=-1)
+ del e
+ if timeout is not None:
+ break
def _next_poll_event(self, timeout=None):
"""