int flags = fcntl(sigfd.wr, F_GETFL);
fcntl(sigfd.wr, F_SETFL, flags | O_NONBLOCK);
signal(SIGUSR1, signal_handler);
- signal(SIGTERM, signal_handler);
return 0;
}
waited += (unsigned) time(NULL) - timestmp;
continue;
}
- dbg("Don't wait on Error in select\n");
- exit(0);
+ dbg("Error in select wait again...\n");
+ continue;
}
if (!retval) { // Timed out
dbg("select wait Timed Out...\n");
infomsg(infomode, "Received SIGUSR1");
(addr_version==AF_INET6)? write_lease6file() : write_leasefile();
continue;
- case SIGTERM:
- infomsg(infomode, "received sigterm");
- (addr_version==AF_INET6)? write_lease6file() : write_leasefile();
- unlink(gconfig.pidfile);
- exit(0);
- break;
default: break;
}
}