diff --git a/event.c b/event.c index 935a331..5731556 100644 --- a/event.c +++ b/event.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -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; }