diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-05-18 18:03:30 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-05-18 18:03:30 +0000 |
commit | ed7319594583dffb825a9602afb95198207b9a0d (patch) | |
tree | 58affc9216f86e5ac6dae14b6dec1eaf716a1388 /gdb/testsuite/gdb.base/kill-after-signal.c | |
parent | 967cff168cc01f56912a7ef9b4755c1502ad761c (diff) | |
download | gdb-ed7319594583dffb825a9602afb95198207b9a0d.zip gdb-ed7319594583dffb825a9602afb95198207b9a0d.tar.gz gdb-ed7319594583dffb825a9602afb95198207b9a0d.tar.bz2 |
gdb/
* linux-nat.c (kill_callback): Use SIGKILL first.
gdb/testsuite/
* gdb.base/kill-after-signal.c: New file.
* gdb.base/kill-after-signal.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.base/kill-after-signal.c')
-rw-r--r-- | gdb/testsuite/gdb.base/kill-after-signal.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/kill-after-signal.c b/gdb/testsuite/gdb.base/kill-after-signal.c new file mode 100644 index 0000000..a1f0018 --- /dev/null +++ b/gdb/testsuite/gdb.base/kill-after-signal.c @@ -0,0 +1,37 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2011 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 + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + 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) +{ + sleep (600); + assert (0); +} + +int +main (void) +{ + signal (SIGUSR1, handler); + raise (SIGUSR1); + assert (0); + return 0; +} |