adding latex

This commit is contained in:
Debucquoy
2023-09-21 08:24:22 +02:00
parent 4fd7542f03
commit 4de4dcf2c2
34 changed files with 2013 additions and 0 deletions

BIN
bac2/os/chap1/a.out Executable file

Binary file not shown.

View File

@ -1 +1,27 @@
#include <bits/types/siginfo_t.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
typedef struct sigaction SIGS;
int counter = 0;
void handler(int sig, siginfo_t* info, void* context) {
if (sig == SIGUSR1){
counter++;
printf("Hello!\n");
}else if ( sig == SIGUSR2 ){
printf("%d\n", counter);
abort();
}
}
int main(int argc, char *argv[]){
SIGS context = {.sa_flags = SA_SIGINFO, .sa_sigaction = handler};
while(1)
pause();
return 0;
}