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