Index: gdb/testsuite/gdb.base/catch-signal.c |
diff --git a/gdb/testsuite/gdb.base/kill-after-signal.c b/gdb/testsuite/gdb.base/catch-signal.c |
similarity index 66% |
copy from gdb/testsuite/gdb.base/kill-after-signal.c |
copy to gdb/testsuite/gdb.base/catch-signal.c |
index 2a6ceb7f4cb47b71950c7d9c07c1e241d277506a..36d34d26477a93ef9e108a4dd0a7d7f7c56252ee 100644 |
--- a/gdb/testsuite/gdb.base/kill-after-signal.c |
+++ b/gdb/testsuite/gdb.base/catch-signal.c |
@@ -1,6 +1,6 @@ |
/* This testcase is part of GDB, the GNU debugger. |
- Copyright 2011-2012 Free Software Foundation, Inc. |
+ Copyright 2012-2013 Free Software Foundation, Inc. |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
@@ -16,22 +16,33 @@ |
along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
#include <signal.h> |
-#include <assert.h> |
#include <unistd.h> |
-#include <stdio.h> |
void |
-handler (int signo) |
+do_nothing (void) |
{ |
- sleep (600); |
- assert (0); |
+} |
+ |
+void |
+handle (int sig) |
+{ |
+ do_nothing (); /* handle marker */ |
} |
int |
-main (void) |
+main () |
{ |
- signal (SIGUSR1, handler); |
- raise (SIGUSR1); |
- assert (0); |
- return 0; |
+ signal (SIGHUP, handle); |
+ signal (SIGUSR1, SIG_IGN); |
+ |
+ raise (SIGHUP); /* first HUP */ |
+ |
+ raise (SIGHUP); /* second HUP */ |
+ |
+ raise (SIGHUP); /* third HUP */ |
+ |
+ raise (SIGHUP); /* fourth HUP */ |
+ |
+ raise (SIGINT); /* first INT */ |
} |
+ |