1
0
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:
Florian Westphal 2010-09-11 11:33:27 +02:00
parent ef3dbf96eb
commit 755f54b150

View File

@ -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
}