From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iFw9Gu+Dx2D1SQAAWB0awg (envelope-from ) for ; Mon, 14 Jun 2021 12:29:35 -0400 Received: by simark.ca (Postfix, from userid 112) id 676F91F163; Mon, 14 Jun 2021 12:29:35 -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.6 required=5.0 tests=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 7095F1E54D for ; Mon, 14 Jun 2021 12:29:34 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 060683954C6C for ; Mon, 14 Jun 2021 16:29:34 +0000 (GMT) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by sourceware.org (Postfix) with ESMTPS id 6B6283847806 for ; Mon, 14 Jun 2021 16:29:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6B6283847806 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f49.google.com with SMTP id z8so15207676wrp.12 for ; Mon, 14 Jun 2021 09:29:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qhWjHcnLwE0yMv7NOWK6IV8GsWzE0R1soRCClwZNdx0=; b=s9is1TouofIJvl2JSfwzPSPNPDQAJDAMdKBtGyyZBlwMr7sdNE7cQk1d05AZQ9v02T SXLb0Xi54O/8VqsVf0RImYAnU/9uAwxAccjJYcwevj0DDYUigZyvxYq57Rv5tuZE/ZWU uhgyRGoJrxFtUg4eXvkevLsw98oyKu2qJhlWBICs3s+PV3VnSlX7/TXjG/hptEy7gRFb Wy/24KX5H1SNOCmh15u5/gcF/jJuBJ90nhR1kpo3PTbTPA0Jx18x87kqTUrKgjvaatrQ PEgZZ7zpNZkcf8amSXg+ETnvVDCv01a17UXtqCNeVDkpGckRiea0H6r1Wid0VhxJYtQY kL/Q== X-Gm-Message-State: AOAM5329JiSQBC8QwQ5/txUqFanz4iS8aPRlLf8SUeDLLcB3y6IEiNiy T9oivUjZTFvdOpEzM97NnSlaeGDIcKvHJA== X-Google-Smtp-Source: ABdhPJy4Ej92MnPL+p3RsLK1YrgizCG6b7ty/muk4ctwLcjXyDseoHyOx4L9NOQYCPodpQowKplw2g== X-Received: by 2002:a05:6000:18ad:: with SMTP id b13mr19441378wri.134.1623688159676; Mon, 14 Jun 2021 09:29:19 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3? ([2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3]) by smtp.gmail.com with ESMTPSA id v17sm20114162wrp.36.2021.06.14.09.29.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Jun 2021 09:29:18 -0700 (PDT) Subject: Re: [PATCH 00/17] Interrupting programs that block/ignore SIGINT From: Pedro Alves To: Eli Zaretskii References: <20210603190243.2609886-1-pedro@palves.net> <835yyuwwuu.fsf@gnu.org> <83mtru6o8g.fsf@gnu.org> Message-ID: <1479d356-0155-3324-a92b-14321e5ef759@palves.net> Date: Mon, 14 Jun 2021 17:29:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <83mtru6o8g.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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" Yes, of course, I just needed some time to think about your comments and experiment with an idea. I'll be replying soon. Please don't take my silence as ignoring you. I'm taking you very seriously, as I always do. On 2021-06-13 11:41 a.m., Eli Zaretskii wrote: > 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. >> >