From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68898 invoked by alias); 19 Nov 2018 19:44:11 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 68178 invoked by uid 89); 19 Nov 2018 19:44:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=love X-HELO: gproxy8-pub.mail.unifiedlayer.com Received: from gproxy8-pub.mail.unifiedlayer.com (HELO gproxy8-pub.mail.unifiedlayer.com) (67.222.33.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Nov 2018 19:44:09 +0000 Received: from cmgw12.unifiedlayer.com (unknown [10.9.0.12]) by gproxy8.mail.unifiedlayer.com (Postfix) with ESMTP id 6A5BE1ABED8 for ; Mon, 19 Nov 2018 12:16:17 -0700 (MST) Received: from box5008.bluehost.com ([50.116.64.19]) by cmsmtp with ESMTP id Op1tgN2xTVl4fOp1tgXChA; Mon, 19 Nov 2018 12:16:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mad-scientist.us; s=default; h=Content-Transfer-Encoding:Mime-Version: Content-Type:References:In-Reply-To:Date:Cc:To:Reply-To:From:Subject: Message-ID:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+68MmE+EVaPPKeCBaKXC9H7yCZvAJWdfCM/UeDVYrW0=; b=DUILBRgIfnwP+9CzO2l+bks9la bI93NKPDI2eRIEWmB9FPYSnxOo+O1qTXHxU76sM5aumAZRaRoDrwHNMHAyQ/0vZFMIjnJE954UnL9 i22xhwkBiIbXR5o9zxAvRXWB4; Received: from [50.226.24.42] (port=45322 helo=pdslaptop) by box5008.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gOp1s-001Bpx-PI; Mon, 19 Nov 2018 12:16:16 -0700 Message-ID: Subject: Re: GDB (not) handling SIGINT...? From: Paul Smith Reply-To: paul@mad-scientist.net To: Pedro Alves , Simon Marchi Cc: gdb@sourceware.org Date: Mon, 19 Nov 2018 19:44:00 -0000 In-Reply-To: <0aa97651789ea8cc5917b73435ab61db5670934a.camel@mad-scientist.net> References: <8003dfcd98e9a4d1e43f53220e0d446669944ead.camel@mad-scientist.net> <17a7ce8aa190956bd7a8ba9bd7cdea16@polymtl.ca> <8b205cb2ff59c49ab9f4ad98564dfea3f5d1586d.camel@mad-scientist.net> <276f4526-1873-0072-206c-c45bb47be3f6@redhat.com> <0aa97651789ea8cc5917b73435ab61db5670934a.camel@mad-scientist.net> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-11/txt/msg00015.txt.bz2 On Mon, 2018-11-19 at 14:07 -0500, Paul Smith wrote: > I got around to trying this and it did work... except for one thing: > when I wanted to continue I had to continue once for each thread in > my program :-/. Actually it stopped thread 1 twice, once at first > then again... I also discovered that detaching doesn't work properly; I guess we have to send along a SIGCONT when we detach. Yep, if I manually kill -CONT the process after I detach it wakes back up. So yeah, possibly a reasonable alternative (although I'm not sure about the delivery of SIGSTOP to each thread...) but it does need a bit more love than just swapping SIGSTOP for SIGINT in child_pass_ctrlc() :)