33 if (sigemptyset(&x) < 0)
35 if (sigaddset(&x, signum) < 0)
40 if (pthread_sigmask(SIG_BLOCK, &x, NULL) != 0)
50 if (sigemptyset(&x) < 0)
52 if (sigaddset(&x, signum) < 0)
54 if (pthread_sigmask(SIG_UNBLOCK, &x, NULL) != 0)
65 struct sigaction action;
66 memset(&action, 0x00,
sizeof(
struct sigaction));
68 action.sa_handler = handler;
69 sigemptyset(&(action.sa_mask));
70 sigaddset(&(action.sa_mask),sig);
72 sigaction(sig, &action, 0);