34 #include <sys/types.h> 37 #define EVSIGNAL_DISCONNECT (SIGRTMIN) 38 #define EVSIGNAL_CLOSE (SIGRTMIN + 1) 39 #define EVSIGNAL_QUIT (SIGRTMIN + 2) 49 sigaddset(&
set, signal);
51 return(pthread_sigmask(SIG_BLOCK, &
set, NULL) != 0);
60 sigaddset(&
set, signal);
62 return(pthread_sigmask(SIG_UNBLOCK, &
set, NULL) != 0);
69 struct sigaction action, old_action;
71 action.sa_handler = signal_handler;
72 sigemptyset(&action.sa_mask);
75 action.sa_flags |= SA_INTERRUPT;
77 return(sigaction(signal, &action, &old_action) != 0);
83 return(kill(0, signal) != 0);
91 sigfillset(&signal_set);
94 sigwait(&signal_set, &signal);
int evSignalBlock(const int signal)
Definition: evSignal.h:44
void evSignalStartSession(void)
Definition: evSignal.h:100
int evSignalSetHandler(const int signal, evSignalHandler signal_handler)
Definition: evSignal.h:66
void evSignalHandler(int)
Definition: evSignal.h:41
int evSignalSend(const int signal)
Definition: evSignal.h:81
int evSignalWait(void)
Definition: evSignal.h:87
int evSignalUnblock(const int signal)
Definition: evSignal.h:55