summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsamr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109>2008-12-16 10:46:33 +0000
committersamr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109>2008-12-16 10:46:33 +0000
commitbf069c36824f59dc5c2865c54c84c4a73836b977 (patch)
tree0d3270a01deaee2d5049a70e4d22da2bc20bc9d4
parent761963e51215c233b49819ae1d685f935c33d33e (diff)
downloadnohands-bf069c36824f59dc5c2865c54c84c4a73836b977.tar.gz
Handle errors from select().
git-svn-id: http://nohands.svn.sourceforge.net/svnroot/nohands/trunk@70 126591fb-c623-4b62-a76d-97a8e4f34109
-rw-r--r--libhfp/events-indep.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libhfp/events-indep.cpp b/libhfp/events-indep.cpp
index 427a966..b2fb406 100644
--- a/libhfp/events-indep.cpp
+++ b/libhfp/events-indep.cpp
@@ -483,6 +483,16 @@ RunOnce(int max_sleep_ms)
res = select(maxfh + 1, &readi, &writei, NULL, top);
+ if (res < 0) {
+ if ((errno != EINTR) &&
+ (errno != ETIMEDOUT)) {
+ LogWarn("Dispatch: select: %s\n", strerror(errno));
+ }
+
+ FD_ZERO(&readi);
+ FD_ZERO(&writei);
+ }
+
Lock();
m_sleeping = false;