mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-25 23:06:52 +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);
|
||||
|
||||
sigprocmask(SIG_BLOCK, &set, NULL);
|
||||
#else
|
||||
sigblock(sig);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -58,6 +60,9 @@ static void Signal_Unblock(int sig)
|
||||
sigaddset(&set, sig);
|
||||
|
||||
sigprocmask(SIG_UNBLOCK, &set, NULL);
|
||||
#else
|
||||
int old = sigblock(0) & ~sig;
|
||||
sigsetmask(old);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user