From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wD/CIE7YyGB4bAAAWB0awg (envelope-from ) for ; Tue, 15 Jun 2021 12:41:50 -0400 Received: by simark.ca (Postfix, from userid 112) id 74A431F163; Tue, 15 Jun 2021 12:41:50 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B92851E939 for ; Tue, 15 Jun 2021 12:41:49 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6F28B384F020 for ; Tue, 15 Jun 2021 16:41:49 +0000 (GMT) Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id 213B538515DE for ; Tue, 15 Jun 2021 16:41:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 213B538515DE Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id E56E284F3D; Tue, 15 Jun 2021 16:41:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G4Dc15xrWz4f97; Tue, 15 Jun 2021 16:41:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6168B2A784; Tue, 15 Jun 2021 16:41:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) To: Eli Zaretskii References: <20210603190243.2609886-1-pedro@palves.net> <835yyuwwuu.fsf@gnu.org> <2af9e861-69f2-80c5-606b-2936b6d2d212@palves.net> <83tulz48yr.fsf@gnu.org> <83bl873xuu.fsf@gnu.org> From: John Baldwin Subject: Re: [PATCH 00/17] Interrupting programs that block/ignore SIGINT Message-ID: <9c6bbbcc-82db-e487-a8cb-b6ca0a0c4268@FreeBSD.org> Date: Tue, 15 Jun 2021 09:41:36 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <83bl873xuu.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 6/15/21 9:18 AM, Eli Zaretskii wrote: >> Cc: gdb-patches@sourceware.org >> From: John Baldwin >> Date: Tue, 15 Jun 2021 08:50:18 -0700 >> >> Put another way, every time I hit Ctrl-C when running a program under >> GDB, the thought in my mind is not "I want to kill the program", it is >> "I want to stop the program so I can examine its state in the debugger". > > So, in your opinion, Ctrl-C in this context is different from C-z and > C-\, to name other keystrokes that cause signals to be delivered? Yes, due to the "supervisor" role of Ctrl-C and the fact I'm using it as a GDB action. FreeBSD has Ctrl-T (for SIGINFO) and I still view that as an action on the inferior not a request to GDB, but Ctrl-C when running under GDB is always in my mind "please ask GDB to stop the program so I can inspect it", not "kill the program". The fact that the default is to not pass SIGINT seems consistent with this view since doing a 'c' after the Ctrl-C resumes it rather than killing the inferior. One has to explicitly use 'kill' or 'signal' after a Ctrl-C to interrupt the child process (vs just stop it). I do think it probably is clearer to use "stop" instead of "interrupt" as you noted though since the "interrupted" term is a bit overloaded and thus ambiguous. -- John Baldwin