From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25400 invoked by alias); 15 Nov 2018 18:04:57 -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 25287 invoked by uid 89); 15 Nov 2018 18:04:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:597 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Nov 2018 18:04:55 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 41DE3307EAAB; Thu, 15 Nov 2018 18:04:54 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DF8F5D75C; Thu, 15 Nov 2018 18:04:52 +0000 (UTC) Subject: Re: GDB (not) handling SIGINT...? To: paul@mad-scientist.net, Simon Marchi References: <8003dfcd98e9a4d1e43f53220e0d446669944ead.camel@mad-scientist.net> <17a7ce8aa190956bd7a8ba9bd7cdea16@polymtl.ca> <8b205cb2ff59c49ab9f4ad98564dfea3f5d1586d.camel@mad-scientist.net> <276f4526-1873-0072-206c-c45bb47be3f6@redhat.com> <6b62b6016ee54a525a4a78618be56b21f1e462df.camel@mad-scientist.net> Cc: gdb@sourceware.org From: Pedro Alves Message-ID: <735333d4-aeef-f10f-9623-cf3f67da3145@redhat.com> Date: Thu, 15 Nov 2018 18:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <6b62b6016ee54a525a4a78618be56b21f1e462df.camel@mad-scientist.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-11/txt/msg00009.txt.bz2 On 11/15/2018 05:12 PM, Paul Smith wrote: > Oh, I understand now. The SIGINT is passed to the child to get it to > stop. Somehow I assumed that there was a magical ptrace way to do > this, rather than having to send normal signals. > Exactly. > I guess there is now: using PTRACE_SEIZE instead of PTRACE_ATTACH, > which will allow you to later send PTRACE_INTERRUPT: presumably if this > were used would solve the problem for attached processes anyway...? Yup, assuming we're OK with "ctrl-c" in the GDB console not resulting in SIGINT. Thanks, Pedro Alves