Linux: Use kill_lwp/tkill instead of kill when killing a process
authorPedro Alves <palves@redhat.com>
Wed, 16 Jul 2014 19:06:55 +0000 (20:06 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 16 Jul 2014 19:06:55 +0000 (20:06 +0100)
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  <palves@redhat.com>

* linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.

gdb/
2014-07-16  Pedro Alves  <palves@redhat.com>

* linux-nat.c (kill_callback): Use kill_lwp, not kill.

gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/linux-nat.c

index 064648f..13c59fa 100644 (file)
@@ -1,3 +1,7 @@
+2014-07-16  Pedro Alves  <palves@redhat.com>
+
+       * linux-nat.c (kill_callback): Use kill_lwp, not kill.
+
 2014-07-16  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_delete_record>: Reformat
index 4658abf..2bcd6ea 100644 (file)
@@ -1,3 +1,7 @@
+2014-07-16  Pedro Alves  <palves@redhat.com>
+
+       * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
+
 2014-07-15  Pedro Alves  <palves@redhat.com>
 
        * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
index 0f4dbe2..521d9a2 100644 (file)
@@ -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;
index c738abf..b50a88e 100644 (file)
@@ -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;