aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsig.c
blob: ded2d20b35702c63f55347584f400606a2f162e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# include	<signal.h>

main ()
{
	int	handle ();
	int	i;
	signal (SIGALRM, handle);
	alarm (5);
	for (i = 0; i < 100000; i++)
		printf ("%d\n", i);
}

handle ()
{
	printf ("signal!\n");
	alarm (5);
}