* 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.
This commit is contained in:
Jan Kratochvil
2011-05-18 18:03:30 +00:00
parent 967cff168c
commit ed73195945
5 changed files with 87 additions and 0 deletions

View File

@@ -3780,6 +3780,18 @@ linux_nat_wait (struct target_ops *ops,
static int
kill_callback (struct lwp_info *lp, void *data)
{
/* PTRACE_KILL may resume the inferior. Send SIGKILL first. */
errno = 0;
kill (GET_LWP (lp->ptid), SIGKILL);
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"KC: kill (SIGKILL) %s, 0, 0 (%s)\n",
target_pid_to_str (lp->ptid),
errno ? safe_strerror (errno) : "OK");
/* Some kernels ignore even SIGKILL for processes under ptrace. */
errno = 0;
ptrace (PTRACE_KILL, GET_LWP (lp->ptid), 0, 0);
if (debug_linux_nat)