Skip to content

Commit

Permalink
aula18
Browse files Browse the repository at this point in the history
  • Loading branch information
flubacheski committed Oct 31, 2024
1 parent f91f54e commit dfb9a39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion material/aulas/18-threads-I/sinais-concorrentes_aula_passada.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
Para compilar use:
gcc -g sinais-concorrentes_aula_passada.c -o sinais
para ver o código dos sinais
man 7 signal
SIGINT - 2
SIGTERM - 15
*/

#include <stdio.h>
#include <unistd.h>
#include <signal.h>
Expand Down Expand Up @@ -31,7 +41,7 @@ int main() {
handler_sigint.sa_handler = sigint_handler;
handler_sigint.sa_flags = 0;
sigemptyset(&handler_sigint.sa_mask);
// bloqueia o SIGTERM
//bloqueia o SIGTERM
sigaddset(&handler_sigint.sa_mask, SIGTERM);

sigaction(SIGINT, &handler_sigint, NULL);
Expand Down
Binary file modified material/aulas/18-threads-I/slides.pdf
100644 → 100755
Binary file not shown.

0 comments on commit dfb9a39

Please sign in to comment.