lib update

This commit is contained in:
Olaf Rempel 2009-05-12 20:12:16 +02:00
parent d5578f6073
commit e164b672f7

16
event.c
View File

@ -20,6 +20,7 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
@ -285,12 +286,15 @@ int event_loop(void)
} }
int i = select(maxfd +1, readfds, writefds, NULL, timeout_p); int i = select(maxfd +1, readfds, writefds, NULL, timeout_p);
if (i <= 0) { if (i < 0 && errno == EINTR) {
/* On error, -1 is returned, and errno is set errno = 0;
* appropriately; the sets and timeout become continue;
* undefined, so do not rely on their contents
* after an error. } else if (i < 0) {
*/ log_print(LOG_ERROR, "event_loop(): select():");
continue;
} else if (i == 0) {
continue; continue;
} }