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

View File

@ -19,9 +19,16 @@ void handler(int sig, siginfo_t* info, void* context) {
}
int main(int argc, char *argv[]){
SIGS context = {.sa_flags = SA_SIGINFO, .sa_sigaction = handler};
while(1)
pause();
sigaction(SIGUSR1, &context, NULL);
sigaction(SIGUSR2, &context, NULL);
while(1){
printf("The program is running...\n");
sleep(1);
}
return 0;
}