]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
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 064648f21057e335165ee1b65adc34cd26c77152..13c59fa95a942e9e939a6c9080cfaedaceeaab13 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 4658abfa78890b9d7fd75bb79938b919173efd51..2bcd6ea7971c19ed869b5beb4c6a36390188a61d 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 0f4dbe2ebbc037fccb71efc348250967e9302268..521d9a226b8f00fe3957155a0653f74f25de7cb6 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 c738abf9f3e7c13e61edb2a10498bc48acbd3d2c..b50a88e3b8f53666e5907b266e24f0508b8b9beb 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;