Replace usages of sigwait(3) with sigwaitinfo(2)
This is basically the same call, but it has the advantage of being supported by FreeBSD's valgrind, which sigwait() is not. References #1106.
This commit is contained in:
@@ -383,14 +383,13 @@ METHOD(fast_dispatcher_t, waitsignal, void,
|
||||
private_fast_dispatcher_t *this)
|
||||
{
|
||||
sigset_t set;
|
||||
int sig;
|
||||
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGINT);
|
||||
sigaddset(&set, SIGTERM);
|
||||
sigaddset(&set, SIGHUP);
|
||||
sigprocmask(SIG_BLOCK, &set, NULL);
|
||||
sigwait(&set, &sig);
|
||||
sigwaitinfo(&set, NULL);
|
||||
}
|
||||
|
||||
METHOD(fast_dispatcher_t, destroy, void,
|
||||
|
||||
Reference in New Issue
Block a user