This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [non-stop] 08/10 linux native support
- From: Michael Snyder <msnyder at specifix dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Pedro Alves <pedro at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Tue, 08 Jul 2008 20:25:36 -0700
- Subject: Re: [non-stop] 08/10 linux native support
- References: <200806152205.49241.pedro@codesourcery.com> <200806252217.25796.pedro@codesourcery.com> <20080625221220.GB5723@caradoc.them.org> <200807020434.50543.pedro@codesourcery.com> <20080707182009.GE1778@caradoc.them.org>
On Mon, 2008-07-07 at 14:20 -0400, Daniel Jacobowitz wrote:
> On Wed, Jul 02, 2008 at 04:34:50AM +0100, Pedro Alves wrote:
> > @@ -337,7 +337,9 @@ linux_fork_killall (void)
> > {
> > pid = PIDGET (fp->ptid);
> > do {
> > - ptrace (PT_KILL, pid, 0, 0);
> > + /* Use SIGKILL instead of PTRACE_KILL because the former works even
> > + if the thread is running, while the later doesn't. */
> > + kill (pid, SIGKILL);
> > ret = waitpid (pid, &status, 0);
> > /* We might get a SIGCHLD instead of an exit status. This is
> > aggravated by the first kill above - a child has just
>
> This is OK but if anyone wants to make fork support handle
> multi-threaded programs someday we may need to expose kill_lwp.
Fork is undefined in a multi-threaded program.