Browse Source

lib update

master
Olaf Rempel 11 years ago
parent
commit
e164b672f7
1 changed files with 10 additions and 6 deletions
  1. +10
    -6
      event.c

+ 10
- 6
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;
}



Loading…
Cancel
Save