#include #include #include void handler(int n) { printf("signaled\n"); } int main() { FILE * x; struct sigaction act; memset(&act, 0 , sizeof(act)); act.sa_handler = handler; act.sa_flags = 0; sigaction(SIGINT, &act, NULL); //signal(SIGINT, handler); printf("before\n"); x = fopen("ojo-pipa", "r"); printf("after\n"); }