cours_progra/bac2/os/chap1/ex5.c
Debucquoy b0f02b0d5d
.
2023-10-18 20:27:40 +02:00

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;
}