mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
Make native platform's main loop less noisy.
This commit is contained in:
parent
6ea744421b
commit
b9e15a5986
@ -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++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user