start signal.h
This commit is contained in:
parent
42911ccf67
commit
408e9b0e81
4 changed files with 96 additions and 2 deletions
|
@ -1,9 +1,16 @@
|
|||
#define _STDLIB_DEBUG
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
void test_signal_handler(int x) {
|
||||
printf("interompu\n");
|
||||
_Exit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
printf("%.16g\n", cosh(10));
|
||||
signal(SIGINT, test_signal_handler);
|
||||
while (1){}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue