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

22
bac2/os/chap1/ex6.c Normal file
View File

@ -0,0 +1,22 @@
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
void handler(int sig){
printf("test");
exit(0);
}
int main(int argc, char *argv[])
{
signal(SIGALRM, handler);
alarm(5);
getchar();
printf("finished without a thing");
return 0;
}