This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: GDB hangs on kill or quit (after following a fork child, not detaching from the parent)
- From: Michael Snyder <msnyder at vmware dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 18 Dec 2008 11:20:57 -0800
- Subject: Re: GDB hangs on kill or quit (after following a fork child, not detaching from the parent)
- References: <200812122113.57018.pedro@codesourcery.com>
Pedro Alves wrote:
[ Michael, you're the forks man. CCing you in case see an issue with
the attached patch? ]
That's unfortunate -- I haven't thought about this since implementing
fork-based checkpoints, 2 or 3 years ago. ;-/
When there are forks involved, linux_nat_kill calls into linux_fork_killall
to do the killing. But, when following a fork child, and not
detaching from the parent, we defer adding the child fork to the
list of forks (which is confusing IMHO, see below),
Do you have any intuition as to why we did that?
I don't remember. Could it have been related to the
checkpoint case?
Otherwise it could simply have been an oversight...
I like your results, and your code changes look fine.
Can you confirm that it doesn't adversely affect the
checkpoint testsuites?