From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23750 invoked by alias); 15 Apr 2008 12:44:19 -0000 Received: (qmail 23741 invoked by uid 22791); 15 Apr 2008 12:44:19 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 15 Apr 2008 12:43:57 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id CC04998278; Tue, 15 Apr 2008 12:43:55 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id AC2D098149; Tue, 15 Apr 2008 12:43:55 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JlkVu-0000GG-S6; Tue, 15 Apr 2008 08:43:54 -0400 Date: Tue, 15 Apr 2008 13:02:00 -0000 From: Daniel Jacobowitz To: Roland McGrath Cc: Jan Kratochvil , Doug Evans , GDB Patches , mark.kettenis@xs4all.nl Subject: Re: [patch] Fix Linux attach to signalled/stopped processes Message-ID: <20080415124354.GB32510@caradoc.them.org> Mail-Followup-To: Roland McGrath , Jan Kratochvil , Doug Evans , GDB Patches , mark.kettenis@xs4all.nl References: <20080401223012.GA14076@host0.dyn.jankratochvil.net> <20080410153735.GD21662@caradoc.them.org> <20080410154839.GA5375@host0.dyn.jankratochvil.net> <20080410231205.2DBFD26F992@magilla.localdomain> <20080411161824.GA4183@host0.dyn.jankratochvil.net> <20080412000155.7F07A26FA5E@magilla.localdomain> <20080414143448.GA32227@caradoc.them.org> <20080415012633.6573626FA5F@magilla.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080415012633.6573626FA5F@magilla.localdomain> User-Agent: Mutt/1.5.17 (2007-12-11) 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-04/txt/msg00281.txt.bz2 On Mon, Apr 14, 2008 at 06:26:33PM -0700, Roland McGrath wrote: > The significance of SIGSTOP is that it cannot be blocked (and that it's > what PTRACE_ATTACH generates anyway). For the thread "to be signalled", > you have to generate some signal that is not blocked by that thread. > Every other signal can be blocked, except for SIGKILL (which is too > significant in its own right). Thanks, I understand better now. I'll update the comments in the patch, so that I don't confuse the next person to look at this. > In practice you will 99.44% of the time be able to find some RT signal > that is not blocked. But to worry about the 0.66% you still have to > fall back to SIGSTOP, and in that case you can't rely on queuing. Wouldn't this be racy, again? If the process is running, it might be about to block the signal we chose to stop it. -- Daniel Jacobowitz CodeSourcery