From: Pedro Alves Date: Wed, 16 Jul 2014 19:06:55 +0000 (+0100) Subject: Linux: Use kill_lwp/tkill instead of kill when killing a process X-Git-Tag: binutils-2_25~801 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69ff6be55c0e6181223f2b9c93d90ffc9f7fb0f5;p=external%2Fbinutils.git Linux: Use kill_lwp/tkill instead of kill when killing a process Since we use tkill everywhere, using kill to try to kill each lwp individually looks suspiciously odd. We should really be using tgkill everywhere, but at least while we don't get there this makes us consistent. gdb/gdbserver/ 2014-07-16 Pedro Alves * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill. gdb/ 2014-07-16 Pedro Alves * linux-nat.c (kill_callback): Use kill_lwp, not kill. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 064648f..13c59fa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2014-07-16 Pedro Alves + + * linux-nat.c (kill_callback): Use kill_lwp, not kill. + 2014-07-16 Tom Tromey * target.h (struct target_ops) : Reformat diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 4658abf..2bcd6ea 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2014-07-16 Pedro Alves + + * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill. + 2014-07-15 Pedro Alves * linux-low.c (linux_kill_one_lwp): Save errno and work with saved diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 0f4dbe2..521d9a2 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -895,7 +895,7 @@ linux_kill_one_lwp (struct lwp_info *lwp) everywhere. */ errno = 0; - kill (pid, SIGKILL); + kill_lwp (pid, SIGKILL); if (debug_threads) { int save_errno = errno; diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index c738abf..b50a88e 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -3704,7 +3704,7 @@ kill_callback (struct lwp_info *lp, void *data) /* PTRACE_KILL may resume the inferior. Send SIGKILL first. */ errno = 0; - kill (ptid_get_lwp (lp->ptid), SIGKILL); + kill_lwp (ptid_get_lwp (lp->ptid), SIGKILL); if (debug_linux_nat) { int save_errno = errno;