signal.h
This commit is contained in:
parent
408e9b0e81
commit
c6f1a399af
3 changed files with 18 additions and 18 deletions
|
@ -3,14 +3,8 @@
|
|||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
void test_signal_handler(int x) {
|
||||
printf("interompu\n");
|
||||
_Exit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
signal(SIGINT, test_signal_handler);
|
||||
while (1){}
|
||||
raise(SIGKILL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue