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