don't show error on SIGTERM in select() backend

This commit is contained in:
Tilka 2012-05-05 01:10:24 +02:00
parent dce8b97bba
commit ccb66ced4f
1 changed files with 3 additions and 2 deletions

View File

@ -78,10 +78,11 @@ int net_backend_poll_select(struct net_backend* data, int ms)
res = select(backend->maxfd, &backend->rfds, &backend->wfds, &backend->xfds, &tval);
if (res == -1)
{
if (net_error() == EINTR)
return 0;
printf("Error: %d\n", net_error());
}
if (res == -1 && net_error() == EINTR)
return 0;
return res;
}