diff options
author | samr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109> | 2008-12-16 10:46:33 +0000 |
---|---|---|
committer | samr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109> | 2008-12-16 10:46:33 +0000 |
commit | bf069c36824f59dc5c2865c54c84c4a73836b977 (patch) | |
tree | 0d3270a01deaee2d5049a70e4d22da2bc20bc9d4 | |
parent | 761963e51215c233b49819ae1d685f935c33d33e (diff) | |
download | nohands-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.cpp | 10 |
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; |