Text archives Help
- From: sparker@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r800 - trunk/UserInterface
- Date: Wed, 21 Dec 2005 14:09:41 -0700 (MST)
Author: sparker
Date: Wed Dec 21 14:09:41 2005
New Revision: 800
Modified:
trunk/UserInterface/XWindowUI.cc
Log:
Make select call more graceful at handling EINTR
Modified: trunk/UserInterface/XWindowUI.cc
==============================================================================
--- trunk/UserInterface/XWindowUI.cc (original)
+++ trunk/UserInterface/XWindowUI.cc Wed Dec 21 14:09:41 2005
@@ -175,9 +175,12 @@
if(*iter > max)
max = *iter;
}
- int s = select(max+1, &readfds, 0, 0, 0);
- if(s == -1)
- throw ErrnoException("XWindowUI select", errno, __FILE__, __LINE__ );
+ int s;
+ do {
+ s = select(max+1, &readfds, 0, 0, 0);
+ if(s == -1 && errno != EINTR)
+ throw ErrnoException("XWindowUI select", errno, __FILE__, __LINE__ );
+ } while(s <= 0);
if(FD_ISSET(xpipe[0], &readfds)){
// Process the pipe...
- [MANTA] r800 - trunk/UserInterface, sparker, 12/21/2005
Archive powered by MHonArc 2.6.16.