blob: 992812fd0cb0ba342c0ec6e04ad5fc3998022c46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include <signal.h>
#include <stddef.h>
int sighold(int sig)
{
sigset_t mask;
sigemptyset(&mask);
if (sigaddset(&mask, sig) < 0) return -1;
return sigprocmask(SIG_BLOCK, &mask, NULL);
}
|