1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <stdio.h> #include <signal.h> foo(int sig) { return; } main() { sigset_t all; signal (1, foo); sigfillset(&all); sigprocmask(SIG_BLOCK, &all, NULL); printf("Begin pause\n"); pause(); printf("Done pause\n"); }