#include #include #include #include void hello(int signo) { printf("Hello\n"); exit(EXIT_SUCCESS); } int main(int argc, char** argv) { struct sigaction sa; sa.sa_handler = hello; sa.sa_flags = 0; sigaction(SIGINT, &sa, 0); for(;;); }