mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-27 15:54:45 +00:00
signalhandlers: add fallback to deprecated sysv API
This commit is contained in:
parent
ef3dbf96eb
commit
755f54b150
@ -45,6 +45,8 @@ static void Signal_Block(int sig)
|
|||||||
sigaddset(&set, sig);
|
sigaddset(&set, sig);
|
||||||
|
|
||||||
sigprocmask(SIG_BLOCK, &set, NULL);
|
sigprocmask(SIG_BLOCK, &set, NULL);
|
||||||
|
#else
|
||||||
|
sigblock(sig);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,6 +60,9 @@ static void Signal_Unblock(int sig)
|
|||||||
sigaddset(&set, sig);
|
sigaddset(&set, sig);
|
||||||
|
|
||||||
sigprocmask(SIG_UNBLOCK, &set, NULL);
|
sigprocmask(SIG_UNBLOCK, &set, NULL);
|
||||||
|
#else
|
||||||
|
int old = sigblock(0) & ~sig;
|
||||||
|
sigsetmask(old);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user