/* Test blocking and raising SIGUSR1. */ #include "signal.h" static void handler(int signum) { (void) signum; printf("SIGUSR1\n"); } int main(void) { signal(SIGUSR1, handler); sigset_t sigusr1; sigemptyset(&sigusr1); sigaddset(&sigusr1, SIGUSR1); sigprocmask(SIG_BLOCK, &sigusr1, NULL); raise(SIGUSR1); return 0; }