]> Git Repo - qemu.git/blame - tests/testsig.c
basic clone() support
[qemu.git] / tests / testsig.c
CommitLineData
1b6b029e
FB
1#include <stdlib.h>
2#include <stdio.h>
3#include <signal.h>
4#include <unistd.h>
5
6void alarm_handler(int sig)
7{
8 printf("alarm signal=%d\n", sig);
9 alarm(1);
10}
11
12int 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.023801 seconds and 4 git commands to generate.