blob: 4f766ec3a9a3d3bc516f5dadf3338d72840920e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <signal.h> // for sigset_t, sigprocmask
#include <syscall.h> // for __syscall_4, syscall
int sigprocmask(int how, const sigset_t *restrict set, sigset_t *restrict oset)
{
long ret;
sigset_t oldset = { 0 };
ret = syscall(rt_sigprocmask, how, set, &oldset, sizeof(sigset_t));
if (ret < 0)
return -1;
if (oset)
*oset = oldset;
return 0;
}
|