From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5711 invoked by alias); 9 Jul 2008 03:25:56 -0000 Received: (qmail 5703 invoked by uid 22791); 9 Jul 2008 03:25:55 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 Jul 2008 03:25:38 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 70DA73C330; Tue, 8 Jul 2008 20:25:36 -0700 (PDT) Subject: Re: [non-stop] 08/10 linux native support From: Michael Snyder To: Daniel Jacobowitz Cc: Pedro Alves , gdb-patches@sourceware.org In-Reply-To: <20080707182009.GE1778@caradoc.them.org> 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> Content-Type: text/plain Date: Wed, 09 Jul 2008 03:25:00 -0000 Message-Id: <1215573936.3549.126.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00123.txt.bz2 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.