From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 7F77A385782D for ; Sun, 13 Jun 2021 10:41:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F77A385782D Received: from fencepost.gnu.org ([2001:470:142:3::e]:39434) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsNYU-0001b6-3i; Sun, 13 Jun 2021 06:41:26 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3336 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsNYR-0004Yx-CZ; Sun, 13 Jun 2021 06:41:26 -0400 Date: Sun, 13 Jun 2021 13:41:19 +0300 Message-Id: <83mtru6o8g.fsf@gnu.org> From: Eli Zaretskii To: Pedro Alves CC: gdb-patches@sourceware.org In-Reply-To: <835yyuwwuu.fsf@gnu.org> (eliz@gnu.org) Subject: Re: [PATCH 00/17] Interrupting programs that block/ignore SIGINT References: <20210603190243.2609886-1-pedro@palves.net> <835yyuwwuu.fsf@gnu.org> X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Sun, 13 Jun 2021 10:41:27 -0000 Ping! I don't think I received any responses for the below. Can we please discuss this? TIA. > From: eliz@gnu.org (Eli Zaretskii) > Date: Thu, 03 Jun 2021 22:51:05 +0300 > > > From: Pedro Alves > > Date: Thu, 3 Jun 2021 20:02:26 +0100 > > > > Currently, on GNU/Linux, it is not possible to interrupt with Ctrl-C > > programs that block or ignore SIGINT, with e.g., sigprocmask or > > signal(SIGINT, SIG_IGN). You type Ctrl-C, but nothing happens. > > I'm not sure I understand why this is a problem. If a debuggee blocks > or ignores SIGINT, then SIGINT cannot be used to stop it, neither when > it runs outside the debugger nor when it runs under a debugger. There > are enough other methods to stop such a debuggee (e.g., send it a > different signal), but basically such a program clearly tells that it > doesn't want to be interrupted by SIGINT, period. > > Btw, what about programs that install a SIGINT handler that does > something when SIGINT is delivered, but don't block or ignore SIGINT? > > > Similarly, if a program uses sigwait to wait for SIGINT, and the > > program receives a SIGINT, the SIGINT is _not_ intercepted by ptrace, > > it goes straight to the inferior. > > This sounds like a more serious issue, but how many programs use this > technique? > > I guess what I'm asking is whether these issues really justify the > complications of setting up a separate terminal. The fact that the > inferior could be stopped by a different signal, the fact that it > could be hit by SIGHUP, the fact that users will need to decide > whether or not they use the separate-terminal method (which will be > the default, a backward-incompatible change) -- are all these > complications really worth the (IMO) minor issues they solve? > > Thanks. >