#include <signal.h>
#include <sys/wait.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <netdb.h>
#include <netinet/in.h>
fds = fds_init;
if (select(maxfd + 1, &fds, NULL, NULL, NULL) < 0) {
- error("select failed, resuming: %s", strerror(errno));
- sleep(1);
+ if (errno != EINTR) {
+ error("select failed, resuming: %s",
+ strerror(errno));
+ sleep(1);
+ }
continue;
}