]> Git Repo - qemu.git/blob - tests/testsig.c
basic clone() support
[qemu.git] / tests / testsig.c
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <signal.h>
4 #include <unistd.h>
5
6 void alarm_handler(int sig)
7 {
8     printf("alarm signal=%d\n", sig);
9     alarm(1);
10 }
11
12 int main(int argc, char **argv)
13 {
14     struct sigaction act;
15     act.sa_handler = alarm_handler;
16     sigemptyset(&act.sa_mask);
17     act.sa_flags = 0;
18     sigaction(SIGALRM, &act, NULL);
19     alarm(1);
20     for(;;) {
21         sleep(1);
22     }
23     return 0;
24 }
This page took 0.025042 seconds and 4 git commands to generate.