gluon-radv-filterd: Don't kill daemon when select is interrupted
The select can be interrupted when it receives a signal. But the signal might be handled and thus it should not result in an kill. Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
dc70f244c8
commit
bc3b3e300f
@ -635,9 +635,10 @@ int main(int argc, char *argv[]) {
|
|||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
retval = select(G.sock + 1, &rfds, NULL, NULL, &tv);
|
retval = select(G.sock + 1, &rfds, NULL, NULL, &tv);
|
||||||
|
|
||||||
if (retval < 0)
|
if (retval < 0) {
|
||||||
|
if (errno != EINTR)
|
||||||
exit_errno("select() failed");
|
exit_errno("select() failed");
|
||||||
else if (retval) {
|
} else if (retval) {
|
||||||
if (FD_ISSET(G.sock, &rfds)) {
|
if (FD_ISSET(G.sock, &rfds)) {
|
||||||
handle_ra(G.sock);
|
handle_ra(G.sock);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user