aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsig.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsig.c')
-rw-r--r--gdb/testsig.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsig.c b/gdb/testsig.c
new file mode 100644
index 0000000..ded2d20
--- /dev/null
+++ b/gdb/testsig.c
@@ -0,0 +1,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);
+}