This commit is contained in:
Debucquoy
2023-10-18 20:27:40 +02:00
parent 4de4dcf2c2
commit b0f02b0d5d
29 changed files with 700 additions and 2 deletions

19
bac2/os/chap1/ex5.c Normal file
View File

@ -0,0 +1,19 @@
#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;
}