20 lines
299 B
C
20 lines
299 B
C
#include <signal.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
void handler(int sig){
|
|
if(sig == SIGINT)
|
|
while(1)
|
|
printf("I cannot DIE !!!!\n");
|
|
}
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
signal(SIGINT, handler);
|
|
signal(SIGQUIT, handler);
|
|
signal(SIGTERM, handler);
|
|
while(1)
|
|
pause();
|
|
return 0;
|
|
}
|