From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 42QFL+rgxWBGBwAAWB0awg (envelope-from ) for ; Sun, 13 Jun 2021 06:41:46 -0400 Received: by simark.ca (Postfix, from userid 112) id B1E6C1F163; Sun, 13 Jun 2021 06:41:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 DCD6B1E54D for ; Sun, 13 Jun 2021 06:41:45 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 69B9B385E004 for ; Sun, 13 Jun 2021 10:41:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69B9B385E004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623580905; bh=hKDWcfe532KOkIRlhCb14t6xFRStwNmGrdvpB3LlDh0=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Gs7Et/o7rKYHkIMBVBPbweKasj6+fv1kiVCNn75pWsjDztHy4v9/VnfPptGKcCO7N etzRRwPvFamszx1emXQS9ma8ChES+dy+DvwfWYlO49tpelc0V5oiMkfTdXbVa74SGk /2Ukaba77xjA7D3mXqCZPcItZWBYmo1/6biAPhQI= 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> To: Pedro Alves 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-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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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. >