Make native platform's main loop less noisy.

This commit is contained in:
Atis Elsts 2014-04-22 14:38:08 +02:00
parent 6ea744421b
commit b9e15a5986

View File

@ -35,6 +35,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/select.h> #include <sys/select.h>
#include <errno.h>
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#include "net/wpcap-drv.h" #include "net/wpcap-drv.h"
@ -260,7 +261,9 @@ main(int argc, char **argv)
retval = select(maxfd + 1, &fdr, &fdw, NULL, &tv); retval = select(maxfd + 1, &fdr, &fdw, NULL, &tv);
if(retval < 0) { if(retval < 0) {
if(errno != EINTR) {
perror("select"); perror("select");
}
} else if(retval > 0) { } else if(retval > 0) {
/* timeout => retval == 0 */ /* timeout => retval == 0 */
for(i = 0; i <= maxfd; i++) { for(i = 0; i <= maxfd; i++) {