aboutsummaryrefslogblamecommitdiffstats
path: root/tests/signal.c
blob: e4862cd28561e896133bf08c6d8f5e3eab13cf3d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                  
#include <signal.h>
#include <unistd.h>

static void
interrupt()
{
	write(-2, "xyzzy\n", 6);
}

int
main(void)
{
	signal(SIGINT, interrupt);
	kill(getpid(), SIGINT);
	usleep(100000U);
	write(-1, "qwerty\n", 7);
	return 0;
}