]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdbserver/Linux: internal error when killing a process that is already gone
authorPedro Alves <palves@redhat.com>
Tue, 14 Jul 2015 09:48:05 +0000 (10:48 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 14 Jul 2015 09:48:05 +0000 (10:48 +0100)
commit68988aba52a4c6355b03834f70bcebbd114be2cd
tree92afa245b2c0ef6cd46e30d9c3cf36ccadfcfef2
parent0900c4cec7f75a00cccb3537d754c20f99096686
gdbserver/Linux: internal error when killing a process that is already gone

If the process disappears (e.g., killed with "kill -9" from the shell)
while it was stopped under GDBserver's control, and the GDBserver
tries to kill it, GDBserver asserts:

 (gdb) shell kill -9 23084
 (gdb) kill
 ...
 Killing process(es): 23084
 /home/pedro/gdb/mygit/src/gdb/gdbserver/linux-low.c:972: A problem internal to GDBserver has been detected.
 kill_wait_lwp: Assertion `res > 0' failed.
 ...

gdb/gdbserver/ChangeLog:
2015-07-14  Pedro Alves  <palves@redhat.com>

* linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
Instead, ignore ECHILD, and throw an error for other errnos.
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c