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);
79 int UtilSignalIsHandler(
int sig,
void (*handler)(
int))
81 struct sigaction action;
82 memset(&action, 0x00,
sizeof(
struct sigaction));
84 sigaction(sig, NULL, &action);
86 return (action.sa_handler == handler);