GNU bug report logs - #58440
27.2; Exit Code on SIGINT is Zero, But shouldn't Be

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Morten Welinder <mwelinder@HIDDEN>; dated Tue, 11 Oct 2022 13:50:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 13 Oct 2022 13:16:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 09:16:36 2022
Received: from localhost ([127.0.0.1]:59930 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiy4i-0004MG-3j
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 09:16:36 -0400
Received: from mail-lf1-f52.google.com ([209.85.167.52]:35564)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1oiy4f-0004M0-64
 for 58440 <at> debbugs.gnu.org; Thu, 13 Oct 2022 09:16:34 -0400
Received: by mail-lf1-f52.google.com with SMTP id r14so2451877lfm.2
 for <58440 <at> debbugs.gnu.org>; Thu, 13 Oct 2022 06:16:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject
 :date:message-id:reply-to;
 bh=PIQDhKt0hcm1/TmJRx0Vi7vhi/OSWBXyxv4bQkI0h9c=;
 b=AkElYqb5EnMnsNBZpE6R/NgNuREbCHyHaOyV0jA5wP+aUm1q1M7YaF4AXUvRTtDxDm
 h4vVRi4OWL4+GcSZQ9CWt8t6wjRmZn649BAAPXw6ciwwWjiaSPaq+p+I2hmSvRkayoZT
 qty7l2yFQHLUQjJYNskFFh76pKWLcilKP7Pivkg8+U1LSPbPc1/4Z9gAHpoVSuVWWuEG
 FrmBKD54AK+C8UBEMhJ4D4UCoaSEuu017qCZaCroT0FXRUIHO8JO8vUgiXCHTgv8tq4T
 IEpQ4TJiLHPNbrxGgZKdlaKSGjS8qOY3yL20K6NkAKeegfuQx18Zuc8kSWolBX66WYNJ
 56RQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=PIQDhKt0hcm1/TmJRx0Vi7vhi/OSWBXyxv4bQkI0h9c=;
 b=CVO/C+U8FpoOInPttKMisl8d7PgDOimdu+BhhhXqHdgNWZIQnT559K8oQJOvqfV/SQ
 TyS8pYeGfAu1yY0OgUin8kw25L7VAm+UIETHiVjVvKaPtaXLuCmckUSovV8k1KErzjt5
 R2HJFc5QFrIZddR1Mf2s7cdHscbJLnmaJ8GZ++xs25fv2X19rNG0XgInjDaGBHseuXJk
 Klgg7OmW5qOup2hxBpTwI5lQwnxzl722FbRNA3SuCxUQCIDhSxXSFy0tbX8ARNh/t3a2
 T+lhYoyROKB3gToCMpCfvOVlHkCwN9lylpmu00mqy/XMs5b8R+Cqbxwxzo64cA504aFZ
 +Mcg==
X-Gm-Message-State: ACrzQf0gZcma4G3NZEhwnBVP/yTRAQwHD7VUQYXHTmKXkXeLxe09FvyG
 MeYhr5PvC9sgrKsNRlg4Mjk=
X-Google-Smtp-Source: AMsMyM6ZheGUSGew/PjIp3KAHyEwk+Yq37SIg79HRTAQYeCF6DSTjGPqE7ifIKQI3EMVD1gVRuC3GQ==
X-Received: by 2002:a19:7715:0:b0:4a2:c68d:452c with SMTP id
 s21-20020a197715000000b004a2c68d452cmr9560053lfc.520.1665666986983; 
 Thu, 13 Oct 2022 06:16:26 -0700 (PDT)
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se.
 [188.150.171.209]) by smtp.gmail.com with ESMTPSA id
 f15-20020ac251af000000b0049462af8614sm397896lfk.145.2022.10.13.06.16.25
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 13 Oct 2022 06:16:26 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <87y1tk6jtz.fsf@HIDDEN>
Date: Thu, 13 Oct 2022 15:16:25 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <57149AFB-4F02-4561-9B19-1AB39C1FAE5E@HIDDEN>
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
 <87a661avtc.fsf@HIDDEN> <875ygpavg0.fsf@HIDDEN>
 <CBEA83A7-9F99-48EC-B208-F6C41E9CFA0D@HIDDEN> <87a6609qpk.fsf@HIDDEN>
 <62256137-3560-472D-93BF-D353A44D1D56@HIDDEN> <87bkqg87n0.fsf@HIDDEN>
 <83v8oo9frg.fsf@HIDDEN> <87y1tk6jtz.fsf@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58440
Cc: Eli Zaretskii <eliz@HIDDEN>, mwelinder@HIDDEN, 58440 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

13 okt. 2022 kl. 13.31 skrev Lars Ingebrigtsen <larsi@HIDDEN>:

> I'm proposing that we exit on a non-zero value if and when we decide to
> exit after a SIGKILL.

Done! Oh, you meant SIGINT. Never mind then.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 13 Oct 2022 11:31:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 07:31:48 2022
Received: from localhost ([127.0.0.1]:59738 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiwRI-0001ZW-3P
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 07:31:48 -0400
Received: from quimby.gnus.org ([95.216.78.240]:33720)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oiwRG-0001ZI-GW
 for 58440 <at> debbugs.gnu.org; Thu, 13 Oct 2022 07:31:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=uzOOR21ZX7rHfhWC2ZnoS2nP2NTcStNYmPNukMmto3k=; b=awwRnr4V1qD/iWP+Eptl/z8C0V
 GoLBmHmgoYPFza571JjERishd4ov8uvSYAW3T1qUH9j0NNP1J0gaj3s8LkCpPjH6UOKki1F65OFCy
 2QoHL8u00Fg4Br8sBSfR6uo0LKnZkd72FES2cpoZ9EfiiUh5MuYBr0R0JpPjedqe20NM=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oiwR7-0007RL-Rt; Thu, 13 Oct 2022 13:31:39 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
In-Reply-To: <83v8oo9frg.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 13 Oct
 2022 13:31:15 +0300")
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
 <87a661avtc.fsf@HIDDEN> <875ygpavg0.fsf@HIDDEN>
 <CBEA83A7-9F99-48EC-B208-F6C41E9CFA0D@HIDDEN>
 <87a6609qpk.fsf@HIDDEN>
 <62256137-3560-472D-93BF-D353A44D1D56@HIDDEN>
 <87bkqg87n0.fsf@HIDDEN> <83v8oo9frg.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXY1MKSZ2BIRD//
 ////4AazAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDQseDGWxDlYAAAF0SURBVCjPPdGxittAEAbg
 kbndQpUPbIOuT8j5KVaQpEilwiM4VSbYAe9T+Mp0m8Pr4ioXWrH7P2VmZckCCT5mZjX6RSpgaJI/
 UL6UQ9ghTDjbcIDvZ6Qv+Ddji9VwnbH52AETnL72QLzjViA8KpG2vpsrOyJmWt4h95rlwUagnFJs
 tp75Rqrq7TsbRIU9qdOp3bMJsURDaoOrYzoeXq20PffDuaLV8lsp+Or+mCeqmtffAtAL0bJyqmhI
 w7w4LcuV9VIqnx9RI9m/TxkIURMw9CNOURsAjjJ+xNJbtOeMcIllY2ORt8bgL4uA2/gJ+IRbBDuh
 Rd8m7UYkRuwiNRnas43cm9VUsXF9JvV9nPFd1BfSv6RRcfU29t/TKbxkxTmcHNXxp2yGCaqTF/sp
 RGWB7YxC0D0gE5154FZ0bp5JRNPWI2qE+eh13dhEOR2B/CmbTH3HnhZIVIxtuqcNQIsRZaK8m2Sd
 gRpITroV7RS3wfLxrfkPV1CbwxASRxcAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMTAtMTNUMTE6
 MzA6MTIrMDA6MDBri6TAAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTEwLTEzVDExOjMwOjEyKzAw
 OjAwGtYcfAAAAABJRU5ErkJggg==
X-Now-Playing: Jane's _Make More Noise (3)_: "It's A Fine Day"
Date: Thu, 13 Oct 2022 13:31:36 +0200
Message-ID: <87y1tk6jtz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: >> I think it'd make
 sense to change the exit code here -- it seems more >> logical, and I think
 the potential for breakage is small. (I mean, >> there may be people that
 have scripts that rely on Ema [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: mattias.engdegard@HIDDEN, mwelinder@HIDDEN, 58440 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> I think it'd make sense to change the exit code here -- it seems more
>> logical, and I think the potential for breakage is small.  (I mean,
>> there may be people that have scripts that rely on Emacs having a zero
>> exit code on SIGINT, but it seems rather unlikely.)
>> 
>> Anybody have any objections to making this change?
>
> What change did you have in mind?  C-g should still raise SIGINT on
> TTY frames, so if that's the change you propose, I'm against it.

I'm proposing that we exit on a non-zero value if and when we decide to
exit after a SIGKILL.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 13 Oct 2022 10:31:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 06:31:12 2022
Received: from localhost ([127.0.0.1]:59669 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oivUe-0006Dx-0Y
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 06:31:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53142)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1oivUb-0006Dg-Sm
 for 58440 <at> debbugs.gnu.org; Thu, 13 Oct 2022 06:31:10 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56858)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oivUW-0007mF-KH; Thu, 13 Oct 2022 06:31:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=gz+SecIQ1JUe9T3sW+XHzp45+9FK9GGZGCfgJ6otceI=; b=rphKXfDMxWXZV5Py6yYG
 d96LUWA8yftgoeHUuzjsMtlb5CrpZ6oliGrximefmCzxgHzzRgveLwHpTuFzvgTTVFYs8glLzNTPs
 S4vbZYY2h/v7M/u3104e9aZMCxoXBZLCI5FqquLz5sbztv1BM3nWdRnAUJJRRyaeA4JTz6/urAaHv
 uJlYrTXAAc04vtM3HDzLUxN/upPP8Xei6ZZ1S/NBpuX/HIWxbQxdZPTNeP6a8oSTRmAeQY2wobZVf
 FZ/TTs+o73N6N09/iGWNNELcF4VmOhdosD43Ndypnof88sAMuKzpDiOLqvb/2MwJw8rb9EXLf6Ve5
 C9CGDEIyxf2fAg==;
Received: from [87.69.77.57] (port=2946 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oivUT-0002f5-CB; Thu, 13 Oct 2022 06:31:04 -0400
Date: Thu, 13 Oct 2022 13:31:15 +0300
Message-Id: <83v8oo9frg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87bkqg87n0.fsf@HIDDEN> (message from Lars Ingebrigtsen on Thu, 
 13 Oct 2022 10:12:03 +0200)
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
 <87a661avtc.fsf@HIDDEN> <875ygpavg0.fsf@HIDDEN>
 <CBEA83A7-9F99-48EC-B208-F6C41E9CFA0D@HIDDEN>
 <87a6609qpk.fsf@HIDDEN>
 <62256137-3560-472D-93BF-D353A44D1D56@HIDDEN>
 <87bkqg87n0.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: mattias.engdegard@HIDDEN, mwelinder@HIDDEN, 58440 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: 58440 <at> debbugs.gnu.org,  Eli Zaretskii <eliz@HIDDEN>,  Morten Welinder
>  <mwelinder@HIDDEN>
> Date: Thu, 13 Oct 2022 10:12:03 +0200
> 
> Mattias Engdegård <mattias.engdegard@HIDDEN> writes:
> 
> > Yes, it's the natural outcome in any normal GUI application that
> > doesn't have Emacs's complicated relation to SIGINT.
> >
> > I certainly don't mind if you change Emacs in this respect. 
> 
> I think it'd make sense to change the exit code here -- it seems more
> logical, and I think the potential for breakage is small.  (I mean,
> there may be people that have scripts that rely on Emacs having a zero
> exit code on SIGINT, but it seems rather unlikely.)
> 
> Anybody have any objections to making this change?

What change did you have in mind?  C-g should still raise SIGINT on
TTY frames, so if that's the change you propose, I'm against it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 13 Oct 2022 08:12:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 04:12:17 2022
Received: from localhost ([127.0.0.1]:59404 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oitKC-0006Pi-R0
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 04:12:17 -0400
Received: from quimby.gnus.org ([95.216.78.240]:60412)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oitK8-0006PT-In
 for 58440 <at> debbugs.gnu.org; Thu, 13 Oct 2022 04:12:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=9Acd7MgGJbZHOD4G3s9eoG8ZHNMSZAyVDZ8NG28vp5s=; b=DfZ5D2PUPjN1fVQ5f0wB1jwZe2
 0FIMIqBLcdwusk88eofRqbHYlf3WjKwIBXWnevQ/Dv2nI/TcQ3Yo3T3PDpKgeJt1d7QhA325L/DE+
 Jr2i466/M4+Adf/A8hnyEvbzOw0V5xvj1anz6EAQ2ENwM9FNBjQaD3Wzo1tWgJbQD0gM=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oitJz-000624-Ul; Thu, 13 Oct 2022 10:12:06 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
In-Reply-To: <62256137-3560-472D-93BF-D353A44D1D56@HIDDEN> ("Mattias
 =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 13 Oct 2022 10:05:16
 +0200")
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
 <87a661avtc.fsf@HIDDEN> <875ygpavg0.fsf@HIDDEN>
 <CBEA83A7-9F99-48EC-B208-F6C41E9CFA0D@HIDDEN>
 <87a6609qpk.fsf@HIDDEN>
 <62256137-3560-472D-93BF-D353A44D1D56@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUvKy3Kyb2kl2L/
 //85yrkkAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDQgKD9BQNuAAAAHCSURBVCjPJZK/jtpAEMY/
 VrFlXJ0igZKOIrZyPAVCaXKVEzErsxVB4gT7FBaSI0F1BYs4VwZlLXue8sbOVvubP9/MziyCfXg9
 HUgTkUPQhg3brmE+OKCOueqhsgKI2ci9Ma8SVjeNYbbWNw5hHV6Nq3wTiCd8C0l7g2iuFdIsoXUh
 qbwHgk26XmQ9fPoMVaTvBaYRom9qkMZIt7N5C6Qn6pBQ+1S1b0iJTEGEI7czPOtO1462P+6ilpiK
 +JKYHJKT2JYePLa3uJ4h4bNbVIFl7uH83S0nt008AHP3ouqN4hqYWPYviKq4h4TYLTGXInEBSfX2
 qH7XSloXcKzM4ShdYkyersie+ydBEa2OhfEDnB1t1KNb1hjiNFSckJQcjrLg+2MGNdAVhRjUY4AJ
 M1/+28XTxj8Pgxy6EeXz0g96AdF7xo2TOUiCTGTLntaU95CQvdF65zQwzSdkWrdL97KsLzI1zeXq
 azQSUOQMbzP9JJUu45XA7ZBnAuy3OhXpX/sRFLPfWP7rSY8HOFk+/dGXtIc7bbm8RfUcccQ1nbn8
 F4HluwDUcPmaywb7TTgp2uVxi0hgMuVyl0UFIhlEknJJC+AD1XS9OuXPVAsAAAAldEVYdGRhdGU6
 Y3JlYXRlADIwMjItMTAtMTNUMDg6MTA6MTUrMDA6MDDs2sgRAAAAJXRFWHRkYXRlOm1vZGlmeQAy
 MDIyLTEwLTEzVDA4OjEwOjE1KzAwOjAwnYdwrQAAAABJRU5ErkJggg==
X-Now-Playing: The Residents's _Subterranean Modern_: "I Left My Heart In
 San Francisco"
Date: Thu, 13 Oct 2022 10:12:03 +0200
Message-ID: <87bkqg87n0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Mattias Engdegård <mattias.engdegard@HIDDEN> writes: >
    Yes, it's the natural outcome in any normal GUI application that > doesn't
    have Emacs's complicated relation to SIGINT. > > I certainly don't mind if
    you change Emacs in this respect. 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, Morten Welinder <mwelinder@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Mattias Engdeg=C3=A5rd <mattias.engdegard@HIDDEN> writes:

> Yes, it's the natural outcome in any normal GUI application that
> doesn't have Emacs's complicated relation to SIGINT.
>
> I certainly don't mind if you change Emacs in this respect.=20

I think it'd make sense to change the exit code here -- it seems more
logical, and I think the potential for breakage is small.  (I mean,
there may be people that have scripts that rely on Emacs having a zero
exit code on SIGINT, but it seems rather unlikely.)

Anybody have any objections to making this change?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 13 Oct 2022 08:05:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 04:05:26 2022
Received: from localhost ([127.0.0.1]:59361 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oitDZ-0006DH-Ug
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 04:05:26 -0400
Received: from mail-lj1-f180.google.com ([209.85.208.180]:37523)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1oitDY-0006D4-A9
 for 58440 <at> debbugs.gnu.org; Thu, 13 Oct 2022 04:05:24 -0400
Received: by mail-lj1-f180.google.com with SMTP id by36so1373990ljb.4
 for <58440 <at> debbugs.gnu.org>; Thu, 13 Oct 2022 01:05:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject
 :date:message-id:reply-to;
 bh=ewcqgYCqzn0xxz95Qca1Zs0maL8/ImEW9qapLsNTxTk=;
 b=NoDjC6qKh8Q0LmbfTdKPSwDLyfpssX0T1bGwbvKwLQr08Mhynr0MmDNc5NM/YcOaAs
 E46iJ8OdgzNDKvm0C+Nsx5fopfxBD+SmY3tkPgT1qH+7uTiK1QbGesawukwbqDXTCXwU
 04PR0ownjYy5jucZgCVYyWXhvq7CjHCm0ITI4GMpiHes02EH4nIeU3zv3cWUeyN182QJ
 ITOiaxzIe3cmhUEqfK0FYSV5dtL95bXjRkYIyw+xeCKWP3g4JVjyoPVkjVRIZ4dLa7WQ
 s5GC80X2cc07597eNVrgBOXBA6Hv6fTzwrN7idL33D5vzgFTEMZD9Q2dDJNkSL+OaY6b
 ixyg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=ewcqgYCqzn0xxz95Qca1Zs0maL8/ImEW9qapLsNTxTk=;
 b=qjGuplYXxGwHkvyadLTfFNOszx81DfUMAHtuNiYgwilf3FkUUCCx9Q5x3TrAWdU2LC
 jL83G63bGsFkxGs9IOYRJy24J9javiZ6t7mkcGE1fNECp8+Qf/zkcGxdutPwqUsr/A9x
 g22KyPW1hXxyQSiy84e4DM/3f00dQ6I0Sx4zIw5EjB+TARATtY8k71jD1LBlFNYyn38P
 x/qHwc7cpTIBQf0RBcXtQoN+XKile8vZJY5MUQ9Cs8kUc9FQ4VnbrSmsYem/0gb4kKaC
 ewSG2cdOqd2Ccb/pudY/1yVE5Dpx16FY0a44Ar+gYZo2/MPNYQrCdBS2peQuv2WrwVTu
 2Leg==
X-Gm-Message-State: ACrzQf1FIMLQLrBzr1VH74Jo8HdlbE0JAsW0ct4pABxJ/FL+IKq7ooBH
 xY2QaoiSOI8gQeitlfZRFPs=
X-Google-Smtp-Source: AMsMyM5Y9zQaGRSmqxyJKsfWnNXPWMmcrZyDAkOlPI04CRwA8vemkvp0Y05sgRf+bgwAh2/+n2m19A==
X-Received: by 2002:a05:651c:b0c:b0:26e:71e:3da6 with SMTP id
 b12-20020a05651c0b0c00b0026e071e3da6mr13106781ljr.116.1665648318137; 
 Thu, 13 Oct 2022 01:05:18 -0700 (PDT)
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se.
 [188.150.171.209]) by smtp.gmail.com with ESMTPSA id
 q15-20020a2e874f000000b0026f3b4acb9dsm345485ljj.28.2022.10.13.01.05.17
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 13 Oct 2022 01:05:17 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <87a6609qpk.fsf@HIDDEN>
Date: Thu, 13 Oct 2022 10:05:16 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <62256137-3560-472D-93BF-D353A44D1D56@HIDDEN>
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
 <87a661avtc.fsf@HIDDEN> <875ygpavg0.fsf@HIDDEN>
 <CBEA83A7-9F99-48EC-B208-F6C41E9CFA0D@HIDDEN> <87a6609qpk.fsf@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, Morten Welinder <mwelinder@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

13 okt. 2022 kl. 08.34 skrev Lars Ingebrigtsen <larsi@HIDDEN>:

> That's true.  Perhaps it'd be instructive to check what other GUI
> programs return on SIGINT?
>=20
> Let's see...  gimp returned non-zero.  So did xterm.  And so did =
xeyes.

Yes, it's the natural outcome in any normal GUI application that doesn't =
have Emacs's complicated relation to SIGINT.

I certainly don't mind if you change Emacs in this respect. The root of =
the problem is that we use SIGINT for C-g. More precisely, that we set =
C-g as the INTR char for TTY frames. (This is done for historical =
reasons and should be understood in that context.)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 13 Oct 2022 06:35:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 02:35:00 2022
Received: from localhost ([127.0.0.1]:59087 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiro3-00014z-Sk
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2022 02:35:00 -0400
Received: from quimby.gnus.org ([95.216.78.240]:59466)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oiro2-00014m-Cp
 for 58440 <at> debbugs.gnu.org; Thu, 13 Oct 2022 02:34:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=/XFiRDxF+FXkY4bUudydEtWveLvdEa3Y9WSAzZOdnOo=; b=kfZK/kwmQdklr7xKhgsziDj5ml
 zvduhSjLlh5yAa/BOmOLdyQKrZdDrrzyyhJIJvf9Vp3TaEy+BtahX5pNqHl/7LZgUkzXngAspfAmT
 J2wlvwg7vFo3rZ00PVIzzNL+3nwQ0x46z+5SauN344s3YlYCFgP2WpAJRaDFJD5Y0GIk=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oirnt-0005K0-QU; Thu, 13 Oct 2022 08:34:51 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
In-Reply-To: <CBEA83A7-9F99-48EC-B208-F6C41E9CFA0D@HIDDEN> ("Mattias
 =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Wed, 12 Oct 2022 19:39:11
 +0200")
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
 <87a661avtc.fsf@HIDDEN> <875ygpavg0.fsf@HIDDEN>
 <CBEA83A7-9F99-48EC-B208-F6C41E9CFA0D@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXR0MuAf31OTU3/
 //8fmzB2AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+YKDQYbFANy8RYAAAFVSURBVCjPTdKxTsMwEAbg
 /6I4opmCRJHSHUTzFI7UdmDy0A7NxACoyVOABBJjQChSmTokqL6nxGfTKh5sf7J9PucCIGdpWwPX
 1LPMbdMKGv4Rdd9uTtz5bYMgsZB5Pz86pEcS6HTrMDtEsoBkL3gtuCoNonfB/Ywz0qCVgLUFuahf
 HswboNp8SjR3O+uIl4LE3cdtxGbwGUhk4t6G3Kqhp21W+6z3arN2460AH77HzRiFlv5ijEnAfIw7
 jFd8n46RAOv4DI06B+oTCvfRbECLqQt7PEFaH+AHCkgtcW0uw7ZZRU8GV/9IJat1uGebaGVol3tM
 qVet2k10gCUXUnnExEtzfSCPRc7d4KrokdXc7bnUmYetpFovfoW44sHiIeTGK4vHM0ouWxx0QMu/
 Gv4hk4j7hkFvEq1I5G9BtCApSRlKH2clqCnrxr1SKRhQRU3tDsfKZH96SXyAqR/HgQAAACV0RVh0
 ZGF0ZTpjcmVhdGUAMjAyMi0xMC0xM1QwNjoyNzoyMCswMDowMLG1kZ0AAAAldEVYdGRhdGU6bW9k
 aWZ5ADIwMjItMTAtMTNUMDY6Mjc6MjArMDA6MDDA6CkhAAAAAElFTkSuQmCC
X-Now-Playing: Rival Consoles's _Kid Velo_: "Kid Velo"
Date: Thu, 13 Oct 2022 08:34:47 +0200
Message-ID: <87a6609qpk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Mattias Engdegård <mattias.engdegard@HIDDEN> writes: >
    What the correct value is a matter of debate. For instance, it could > be
    argued that SIGINT to a GUI-only Emacs is to be interpreted as a > 'please
    terminate normally' message, in which the exit co [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, Morten Welinder <mwelinder@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Mattias Engdeg=C3=A5rd <mattias.engdegard@HIDDEN> writes:

> What the correct value is a matter of debate. For instance, it could
> be argued that SIGINT to a GUI-only Emacs is to be interpreted as a
> 'please terminate normally' message, in which the exit code 0 may be
> appropriate.

That's true.  Perhaps it'd be instructive to check what other GUI
programs return on SIGINT?

Let's see...  gimp returned non-zero.  So did xterm.  And so did xeyes.

100% non-zero.  =F0=9F=98=81





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 17:39:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 13:39:21 2022
Received: from localhost ([127.0.0.1]:58379 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oifhQ-0004AA-Nz
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 13:39:21 -0400
Received: from mail-lf1-f44.google.com ([209.85.167.44]:44800)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1oifhP-00049y-A6
 for 58440 <at> debbugs.gnu.org; Wed, 12 Oct 2022 13:39:19 -0400
Received: by mail-lf1-f44.google.com with SMTP id s20so26793624lfi.11
 for <58440 <at> debbugs.gnu.org>; Wed, 12 Oct 2022 10:39:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject
 :date:message-id:reply-to;
 bh=lfudbVp/q3MYB9uoBnX11By0KTXniqc0Cx1sdZcN3a0=;
 b=Vd5WIY0SMD+4kOIaoNE0x/B03jVpog4uesAwj1cviLQvqp55TBHRw07ybm2Zvjcox4
 IbW3S1A3MOVfvml6CItV1zOPbK/TL6qqxSFmnL4nXRfIDZ00H6bj3x0/NLD1byx2FxJo
 a79lupUL0VJG69rs8SVMAmF5nOe8rZhoip1RlsU9E0Ay5EiiuZcKdRU2cbCrPU1KWjH5
 sKFbz44P1OqcqpxTTqoZOEuSWTmFaQAG3X9DRw8yXFgtBctC4/voyjl3bhKEVb/6fOo3
 aMcoTfhQqkzbIQWJHD2rAcpOI7aeAtS5DnSjk3W7ahJ/hdzlP446tLk1cGxUCdtkQZwp
 n5xQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:sender:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=lfudbVp/q3MYB9uoBnX11By0KTXniqc0Cx1sdZcN3a0=;
 b=ziFgowWYLd1efNLLt/0JW3dPUP8F7pIIgQ48548Ei3ZE1sbWi1Db9foa7okLAzvv2h
 L5BMmBOGsNqoeZ7GtUnxPwazX+rFiVXCdMD81VOkA5B/i15y3RrFAyAbu8ZMKuxrRfFH
 7XwlvUoAYGuNGlsGe3z6YM0+6Sq4l9UPGwlzI56fHPgA/a2d+u1AkhBRcc3EX+mwy33c
 oxqCai/sAOcni4UqnETNG1gpwZ89R5f7ujDxymZ1tPVFBRRdx+260tbZVY+r56OhCrBO
 Dd4CyDlQ9oatTAxbqLDvb0+0m8UACSs0jKGMj0ls/QbNoxqXu93b4ZJbptX3HFEkKKfG
 jSQw==
X-Gm-Message-State: ACrzQf0oxWDVjoeqlNBxpWeL+N01ljntPDOyqQThEJYRIPcpQF4isds0
 XVfFhb9HaNtag9HM5rXGsCc=
X-Google-Smtp-Source: AMsMyM7AghizxK1aVEdyoCDx906jPrsW9d3Lcpo6Qibfla3cN3ZOd2W9BVSdBoXpZqkYeIyhQ3a6dw==
X-Received: by 2002:a05:6512:3503:b0:496:517:5802 with SMTP id
 h3-20020a056512350300b0049605175802mr10596292lfs.83.1665596353145; 
 Wed, 12 Oct 2022 10:39:13 -0700 (PDT)
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se.
 [188.150.171.209]) by smtp.gmail.com with ESMTPSA id
 v27-20020ac2561b000000b0049f54c5f2a4sm35614lfd.229.2022.10.12.10.39.12
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 12 Oct 2022 10:39:12 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
In-Reply-To: <875ygpavg0.fsf@HIDDEN>
Date: Wed, 12 Oct 2022 19:39:11 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <CBEA83A7-9F99-48EC-B208-F6C41E9CFA0D@HIDDEN>
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
 <87a661avtc.fsf@HIDDEN> <875ygpavg0.fsf@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, Morten Welinder <mwelinder@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

12 okt. 2022 kl. 17.54 skrev Lars Ingebrigtsen <larsi@HIDDEN>:

> And anyway -- we do exit like we're supposed to, just not with the
> correct value.  So I'm not sure this is an explanation for this
> behaviour?

What the correct value is a matter of debate. For instance, it could be =
argued that SIGINT to a GUI-only Emacs is to be interpreted as a 'please =
terminate normally' message, in which the exit code 0 may be =
appropriate.

I have no strong opinion on what it should be (and am not defending =
status quo); it doesn't seem very important but the original reporter =
may disagree.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 15:55:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 11:55:13 2022
Received: from localhost ([127.0.0.1]:58270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oie4b-0001Sy-U9
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 11:55:13 -0400
Received: from quimby.gnus.org ([95.216.78.240]:53242)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oie4X-0001S6-KT
 for 58440 <at> debbugs.gnu.org; Wed, 12 Oct 2022 11:55:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=0H0JOeppA00m1zRdjgBi1FXH/idhxDCo/UGd6f6HRA0=; b=JgQ03BF/CXgP38eKczWSsddE3d
 PGZC8LWEgMANTwiJlQAQ9aR2UNIvOW7B8OTJhiyVQY68jo4QiHOP30ObVyKQKpnguQA2496I1MPsa
 1n2UCXuziiqM3z8zg403UZBAz5RTs5vBq9pKxIHQX0iYyQ6ctdm7SNDnULRW77dlu9Sg=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oie4O-0007u3-L9; Wed, 12 Oct 2022 17:54:58 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
In-Reply-To: <87a661avtc.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Wed,
 12 Oct 2022 17:46:55 +0200")
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
 <87a661avtc.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJ
 cEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfmCgwPKykzMdceAAABl0lEQVRIx61Vy7HDMAhce9SU
 j9tEeqAiekgTFJNG3gEJC0m2k5nHJTFmgeXn7cCtiA6KHQ8i8iMAzIjy4J+jZoogEyiHGAHCd/9+
 CjAABOoepcJsAjQOXj493RLah4mHXXLmAgAka+psYcKgpqTaeTMLM2u6YF6GXg5Jn6RJUwDYPrCh
 ++JhACje1Q0B4FVTynUWIedIFvxKLkh1X4mdnhjV2j7Ng2ZrGDQrPLcKmMSIqFCS62m1rtj2DGDq
 Fp8BXop5dB9SwvcAA1SgPB+rXFXJ+y9P+5AirLbvhoMO1QmALc1Nrxzt/M3+KsK1FNgiU20/8coa
 ofvLp6+wb0nu2nZ4La/KKUhtxzz0mXRrBhsHYKbBbo58sSKJ0qN7BM/hE3Ym2wHBsqXBNQ/UduAO
 McueGH0J0NWV/rcIBUgXy7yCVZMWjjNpc+PeoSA03uDi7rr7mDPQ9Jfj8BmuFwGAmkc471XMkGi/
 zyrVkYJ5NNod95MfwkhO6d+4r9sgKPmW1BA6t6ZfoBU9Xa6VECUFsMFj646eX84/BS+GVEnRtQUA
 AAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMTAtMTJUMTU6NDM6NDErMDA6MDC+XuW+AAAAJXRFWHRk
 YXRlOm1vZGlmeQAyMDIyLTEwLTEyVDE1OjQzOjQxKzAwOjAwzwNdAgAAAABJRU5ErkJggg==
X-Now-Playing: Severed Heads's _Under Gail Succubus_: "Psychic Squirt"
Date: Wed, 12 Oct 2022 17:54:55 +0200
Message-ID: <875ygpavg0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Lars Ingebrigtsen <larsi@HIDDEN> writes: >>> It does seem
 like a bug -- I'd expect a non-zero exit code in this case. >> >> It's by
 design, more or less: see handle_interrupt_signal in >> keyboard.c. Whether
 that design is desired or not is [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, Morten Welinder <mwelinder@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

>>> It does seem like a bug -- I'd expect a non-zero exit code in this case. 
>>
>> It's by design, more or less: see handle_interrupt_signal in
>> keyboard.c. Whether that design is desired or not is a different
>> matter.
>>
>> (C-g should probably not generate a signal in the first place; it
>> creates more problems than it solves.)
>
> Hm, sounds like it...
>
> But looking at the code:

And anyway -- we do exit like we're supposed to, just not with the
correct value.  So I'm not sure this is an explanation for this
behaviour?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 15:47:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 11:47:18 2022
Received: from localhost ([127.0.0.1]:58261 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oidwv-0001E5-Gz
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 11:47:18 -0400
Received: from quimby.gnus.org ([95.216.78.240]:53066)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oidwr-0001Dm-B0
 for 58440 <at> debbugs.gnu.org; Wed, 12 Oct 2022 11:47:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=CrVtvtvNwBrilxQqhEKUA+GeSjw44yXtrcEe/O9xwTU=; b=YIvo7LOmImQjB/j1S51cW+Vnp+
 rgcxyvQdz2zvSX6W0OqaBvMaTQJ0fUUyuReI6CasUNrje84pYGteWqjCQ9t0+E/q5Lau8HueODp/8
 1yKaw8fL6zMV02icHvKq2swkG+A/eSOFN+31gvpT0WSD31eovCAbCRJsIGTDbcFiiiCA=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oidwh-0007pC-Pa; Wed, 12 Oct 2022 17:47:01 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
In-Reply-To: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN> ("Mattias
 =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Wed, 12 Oct 2022 17:31:33
 +0200")
References: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAJ
 cEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfmCgwPKykzMdceAAABl0lEQVRIx61Vy7HDMAhce9SU
 j9tEeqAiekgTFJNG3gEJC0m2k5nHJTFmgeXn7cCtiA6KHQ8i8iMAzIjy4J+jZoogEyiHGAHCd/9+
 CjAABOoepcJsAjQOXj493RLah4mHXXLmAgAka+psYcKgpqTaeTMLM2u6YF6GXg5Jn6RJUwDYPrCh
 ++JhACje1Q0B4FVTynUWIedIFvxKLkh1X4mdnhjV2j7Ng2ZrGDQrPLcKmMSIqFCS62m1rtj2DGDq
 Fp8BXop5dB9SwvcAA1SgPB+rXFXJ+y9P+5AirLbvhoMO1QmALc1Nrxzt/M3+KsK1FNgiU20/8coa
 ofvLp6+wb0nu2nZ4La/KKUhtxzz0mXRrBhsHYKbBbo58sSKJ0qN7BM/hE3Ym2wHBsqXBNQ/UduAO
 McueGH0J0NWV/rcIBUgXy7yCVZMWjjNpc+PeoSA03uDi7rr7mDPQ9Jfj8BmuFwGAmkc471XMkGi/
 zyrVkYJ5NNod95MfwkhO6d+4r9sgKPmW1BA6t6ZfoBU9Xa6VECUFsMFj646eX84/BS+GVEnRtQUA
 AAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMTAtMTJUMTU6NDM6NDErMDA6MDC+XuW+AAAAJXRFWHRk
 YXRlOm1vZGlmeQAyMDIyLTEwLTEyVDE1OjQzOjQxKzAwOjAwzwNdAgAAAABJRU5ErkJggg==
X-Now-Playing: Severed Heads's _Under Gail Succubus_: "Three Doors"
Date: Wed, 12 Oct 2022 17:46:55 +0200
Message-ID: <87a661avtc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Mattias Engdegård <mattias.engdegard@HIDDEN> writes: >>
    It does seem like a bug -- I'd expect a non-zero exit code in this case.
   > > It's by design, more or less: see handle_interrupt_signal in > keyboard.c.
    Whether that design is desired or not is a di [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, Morten Welinder <mwelinder@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Mattias Engdeg=C3=A5rd <mattias.engdegard@HIDDEN> writes:

>> It does seem like a bug -- I'd expect a non-zero exit code in this case.=
=20
>
> It's by design, more or less: see handle_interrupt_signal in
> keyboard.c. Whether that design is desired or not is a different
> matter.
>
> (C-g should probably not generate a signal in the first place; it
> creates more problems than it solves.)

Hm, sounds like it...

But looking at the code:

----
/* The SIGINT handler.

   If we have a frame on the controlling tty, we assume that the
   SIGINT was generated by C-g, so we call handle_interrupt.
   Otherwise, tell maybe_quit to kill Emacs.  */

static void
handle_interrupt_signal (int sig)
----

But if I=20

./src/emacs -Q && echo 'OK'

and then `C-g', that has no effect, but we still hit this logic?  And
even if:

(./src/emacs -Q && echo 'OK' )&

where the Emacs definitely isn't attached to the tty, then `C-g' in the
terminal can't have any effect (and doesn't).  But we still end up in
this code?

That seems like a bug, possibly?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 15:40:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 11:40:43 2022
Received: from localhost ([127.0.0.1]:58257 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oidqa-000131-2g
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 11:40:42 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49036)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1oidqV-00012j-6V
 for 58440 <at> debbugs.gnu.org; Wed, 12 Oct 2022 11:40:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59830)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oidqP-0001h7-Tm; Wed, 12 Oct 2022 11:40:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=anyY+dJ60XR1nuKPXb/02ggwiOOgw/5KAw6iNdwKI0o=; b=Aw5MBCkDP3YJ
 EPTJAIuecK2K0S/8zWqyhxq5X8d5szTo/f26GrjTY03YzLi3YtyKqUaZ8fwYMqGBDMv3/Jb0tHm2D
 1HwarjewcFy8cRFhfHYeuJTTRpCxenlwvuE0tEsShIpQXIWS+j/fyxq8ZxdQPoMXf9+J4Vba5SZyG
 bB04d0ADsh4k2BYvnY4hPcmgXM86El2meqVFiUqrEFsUm+XosUsyazwQ6lwGeq9qhrVvUY7sQfVBC
 MDoMh5JjLHhHg9e+7+A/fEPygj/7XFIb4lW43cv881bxl2eBKXKp/nJn82W4erCt/Mu+XOLWaj03K
 xCKUCwAwXYkqtbj7CyVOiA==;
Received: from [87.69.77.57] (port=4774 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oidqP-0003Qi-6O; Wed, 12 Oct 2022 11:40:29 -0400
Date: Wed, 12 Oct 2022 18:40:40 +0300
Message-Id: <83mta1aw3r.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87ilkpayv7.fsf@HIDDEN> (message from Lars Ingebrigtsen on Wed, 
 12 Oct 2022 16:41:00 +0200)
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
References: <CANv4PNnm3XUPdWnhv_-b3ENv7Ms7LsqB2NY3pxr_mV1EvF1qJQ@HIDDEN>
 <87czaxcmmj.fsf@HIDDEN> <83tu49aznn.fsf@HIDDEN> <87ilkpayv7.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, mwelinder@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: mwelinder@HIDDEN,  58440 <at> debbugs.gnu.org
> Date: Wed, 12 Oct 2022 16:41:00 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > What happens if you say
> >
> >   ./src/emacs -Q && echo 'OK'
> >
> > does it say OK when you kill Emacs with SIGINT?
> 
> Yes.

That's strange.  So the next step is to attach a debugger to Emacs
before delivering SIGINT to it, and see why we don't exit with the
status of 1.

What I verified is that when I do

  ./src/emacs -Q -nw && echo 'OK'

and then type "kill -INT EMACS-PID" from another terminal, Emacs does
a keyboard quit (i.e. flashes the display and says "Quit" in the
echo-area), which is exactly as I expect.  So in the -nw case, the
installed SIGINT handler is called and does what is expected.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 15:31:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 11:31:47 2022
Received: from localhost ([127.0.0.1]:58242 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oidhx-0000nz-Ty
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 11:31:47 -0400
Received: from mail-lj1-f173.google.com ([209.85.208.173]:33343)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattias.engdegard@HIDDEN>) id 1oidht-0000nf-IH
 for 58440 <at> debbugs.gnu.org; Wed, 12 Oct 2022 11:31:44 -0400
Received: by mail-lj1-f173.google.com with SMTP id a25so15096727ljk.0
 for <58440 <at> debbugs.gnu.org>; Wed, 12 Oct 2022 08:31:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:sender:from:to:cc:subject:date
 :message-id:reply-to;
 bh=dJp0/ZLS7eK/oXeVRGzaBXdcPfgtw25AAAspfpC2GhI=;
 b=Wva9edqYx2TnTL+t3VqudX08QnHGROJABxgURsY7OZUMqGiavhUwF/zJr7Pc3196Op
 ilM9gc72BLFSob6OKjzvRRFkwgh6cEx7I2P6hN8zoIxYIUcxRJyi/neJjoYYotvOcI3x
 0Bjd0UOsKUWVmzIQPzRw0XVEPFt8JSy8O75ot33kMapUWnDyukl0cOG8EgxrRKF7idPL
 av6Rsbx0tXri+w5nCYOzkRiLHQvoP2KOpVwHAYyErspSLdsmWjylCFTCAe0p7Q4/mrWL
 Yeu/DTWrFOxRlk0V/aZMQvqXrWH4TINXkeTsB+xJpG3G/vL8LuGsh/x8teeFFuZvBZ0d
 N7jA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=dJp0/ZLS7eK/oXeVRGzaBXdcPfgtw25AAAspfpC2GhI=;
 b=MOF6f20blNcbIn8T7+q08BMW0NPaT7TBWJ/AASxYLaMC0bhcoUMkAsG6jWHuqhOo3q
 v5rlqaGbfrOT3Zw14rMuowpN4GFxXaGRr+BGzboaD+tuY2h67tlisMZkBobrweS1L6Y1
 VnuwZ0VxpZpXJ3ZnoTh58ehGMMrp0Y04VIfVO/Pfhhm9u2jkkaSTb7gCoe6LwwkUJf6E
 8X26CPWqEuGsbIXRUtLHYG5bSeShwNEDUZiNUpYL4nJoYnDv5f/FqVKPTR1pjhoTFuCv
 Q7B6B8DeDjhZ+BMzvFBPHCG1xdbsWTHnfQRSFF4tmwsRvbWZhCq2xHX6Ul8B3kYDHZ4r
 z5mA==
X-Gm-Message-State: ACrzQf0Y2Zn4POCcHy9w0sdiX6YUHSJK/q0wComAxizcBNAeWv932W+k
 fgZgR2bRuZ9rAFerHXeVT8I=
X-Google-Smtp-Source: AMsMyM5uflMErcFKPEqeHks45oVhUL6x9xkpCJJ06sluvQG1Fy8k0HSzY7qM2ICSfmOU9l40XTYfQA==
X-Received: by 2002:a2e:9ece:0:b0:26d:ce1c:624 with SMTP id
 h14-20020a2e9ece000000b0026dce1c0624mr11386614ljk.119.1665588695423; 
 Wed, 12 Oct 2022 08:31:35 -0700 (PDT)
Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se.
 [188.150.171.209]) by smtp.gmail.com with ESMTPSA id
 e27-20020a05651c039b00b0026c2baa72d4sm7144ljp.27.2022.10.12.08.31.34
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 12 Oct 2022 08:31:34 -0700 (PDT)
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattias.engdegard@HIDDEN>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Subject: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
Message-Id: <2A45406C-33B5-4A42-88F8-001D53C7351D@HIDDEN>
Date: Wed, 12 Oct 2022 17:31:33 +0200
To: Lars Ingebrigtsen <larsi@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, Morten Welinder <mwelinder@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> It does seem like a bug -- I'd expect a non-zero exit code in this =
case.=20

It's by design, more or less: see handle_interrupt_signal in keyboard.c. =
Whether that design is desired or not is a different matter.

(C-g should probably not generate a signal in the first place; it =
creates more problems than it solves.)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 14:41:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 10:41:13 2022
Received: from localhost ([127.0.0.1]:58178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oicv3-0007ja-Br
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 10:41:13 -0400
Received: from quimby.gnus.org ([95.216.78.240]:52476)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oicv1-0007jG-9a
 for 58440 <at> debbugs.gnu.org; Wed, 12 Oct 2022 10:41:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=tcFPpfMLNoKwD9kfCnbk4zMQEzLlxxbAvwsJZoqQ0zM=; b=htyXYRQGYEkGpw1SGku2jWN7Fu
 HUDbi1JVP2C0pY/pHIMOFsDRyTH86duAJHEoFk40F/j7AmMY/qZRZ5aa8LTdzI/BIYPdxvZ7B4Ztl
 CPFbhJWQSy05Bbc7YeVmxHiT+SMBA02HcCNGEX07yR50pbQTk63xg1RtlkbBUoOzNhN4=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oicus-0007NR-BB; Wed, 12 Oct 2022 16:41:04 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
In-Reply-To: <83tu49aznn.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 12 Oct
 2022 17:23:56 +0300")
References: <CANv4PNnm3XUPdWnhv_-b3ENv7Ms7LsqB2NY3pxr_mV1EvF1qJQ@HIDDEN>
 <87czaxcmmj.fsf@HIDDEN> <83tu49aznn.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEX6+fPm3NPTuai+
 eWn///8U6o1RAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+YKDA4oF9i/80EAAAG2SURBVDjLdVQLtuow
 CAxxAwzdQCAbuCb739sbbJvoeZqj1HaAGT61lP+OtOsHluHx2jD0hAYCCCmS3qhacAEe0zXQHg0g
 qFA5o6NCWriboliYhjLqZGMswBsvoqJB+y5Gy5cjW1bebR+c4G0WUJPgzCUf2avrKvktJcUU82Ll
 eJ7AnUpVa3djGVrE8ZEuApI8AjB2A3U4NHmgAJotwLJXIBUtu9AXcIT32VBkMBV8pdIjrAdpzeGG
 SJknYB49woUawtxXJljwdAJ9UF3snhGYM0blpXvg5qD4Pubs02LyuoHymL3nB30+OwVgA6PPcYxK
 Sw1tAVLJOuyv9kTQsOaRdUeUan3OYVgkIQc3iPLhESxe7xCDjWkjhSv7voHi6LBnYXE4ggu0C9FH
 Mjq7NtixtlRxltzYtPzK3IWcQ0bO++y9LlkvgN6S2nZP4lop0cwnax4wlXTSx5++XpM71ZWTMn2t
 8t33b5uenj+A/Vg+gbBXw3LZxFrkW3VyR2p8DHdXsRzBFYjkkOPpqYqrnXt8AlyyIt3R2PNept2A
 tGokAreaNGXwT+AC2NBdbdH3l/l7HT/OL+d/Z5Yvh+QSnfwAAAAldEVYdGRhdGU6Y3JlYXRlADIw
 MjItMTAtMTJUMTQ6NDA6MjIrMDA6MDB/eJQiAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTEwLTEy
 VDE0OjQwOjIyKzAwOjAwDiUsngAAAABJRU5ErkJggg==
X-Now-Playing: Devin and Gary's _Go Outside_: "Go Outside"
Date: Wed, 12 Oct 2022 16:41:00 +0200
Message-ID: <87ilkpayv7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: > What happens if you
 say > > ./src/emacs -Q && echo 'OK' > > does it say OK when you kill Emacs
 with SIGINT? Yes. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, mwelinder@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

> What happens if you say
>
>   ./src/emacs -Q && echo 'OK'
>
> does it say OK when you kill Emacs with SIGINT?

Yes.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 14:24:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 10:24:04 2022
Received: from localhost ([127.0.0.1]:58156 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiceS-0007Cg-D0
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 10:24:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56914)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1oiceQ-0007C2-AW
 for 58440 <at> debbugs.gnu.org; Wed, 12 Oct 2022 10:24:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43230)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oiceL-0004N0-0B; Wed, 12 Oct 2022 10:23:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=CRfI7xoGIkR8tjzb+FrLT/2jKXVEip8sCNTzNdXNK88=; b=SDKu8qPfQj0/
 8zsm95Q5sYcC/i245GS/c3xXptsAjUULhL70uusT293ulB/pNsG39QauvduO3eaPyTl5ahUyBug1R
 Eh9lOwhIpPaQjsVz5j3OS8ffWzRwAKjOfGvsAsgBYnnUS/EdwwA3lYgjWd8ANIhJAM5L9Gz7G6c18
 hoSaqZBRinMt2tP+zyGVzloQxUkshzGRW+5vKxRWcaANSzf4y8+kR7N7saS+0DwrkSC+G2WsiMR5+
 VIJOq6b8cghNNS9wEOKoX2ZZSLHJc9u/MomgkGTcrMEUc1ubVEh2TmK2JUgnE8QCWMp5lKRqFOb2K
 sjt6HZ36PS2Ggqsc/CZafg==;
Received: from [87.69.77.57] (port=4062 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oiceF-0000HI-Gz; Wed, 12 Oct 2022 10:23:56 -0400
Date: Wed, 12 Oct 2022 17:23:56 +0300
Message-Id: <83tu49aznn.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87czaxcmmj.fsf@HIDDEN> (message from Lars Ingebrigtsen on Wed, 
 12 Oct 2022 13:22:28 +0200)
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
References: <CANv4PNnm3XUPdWnhv_-b3ENv7Ms7LsqB2NY3pxr_mV1EvF1qJQ@HIDDEN>
 <87czaxcmmj.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, mwelinder@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: 58440 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
> Date: Wed, 12 Oct 2022 13:22:28 +0200
> 
> Morten Welinder <mwelinder@HIDDEN> writes:
> 
> > 1. Create the following perl script named "ttt":
> 
> Or an easier way to reproduce the issue:
> 
> ./src/emacs -Q; echo $?
> 
> and then "kill -INT" the process and observe that it echoes "0".

What happens if you say

  ./src/emacs -Q && echo 'OK'

does it say OK when you kill Emacs with SIGINT?

> This issue is still present in Emacs 29.
> 
> It does seem like a bug -- I'd expect a non-zero exit code in this case.

I very much doubt that the above is the same problem: Morten didn't
involve Python without a good reason.

And I'm not sure we have anything to do with what Morten reports: how
do we know if Python or its 'system' call blocks some signals, or does
some other non-trivial stuff with them?  Likewise with xterm.

> (And...  I'm not sure where the action taken for the signal really is
> after poking at the
> 
>   maybe_fatal_sig (SIGINT);
> 
> code paths a few minutes.)

In a GUI session, AFAIU SIGINT is handled as a fatal signal, and
should cause Emacs to shut down and return with exit code of 1.  Are
you saying that you don't see that in a debugger?  (I don't have
access to a GNU/Linux system where I can run a GUI Emacs session.)

By contrast, in a TTY (a.k.a. "-nw") session, SIGINT causes a keyboard
quit (we reprogram the keyboard to raise SIGINT when the user preses
C-g), so Emacs should not exit at all if SIGINT is delivered to it.
And Ctrl-C doesn't cause SIGINT anyway.

So I'd appreciate if Morten could explain some more of what he thinks
is going on and why he thinks this is an Emacs problem to begin with.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at 58440 <at> debbugs.gnu.org:


Received: (at 58440) by debbugs.gnu.org; 12 Oct 2022 11:22:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 12 07:22:39 2022
Received: from localhost ([127.0.0.1]:55895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiZot-0000C1-Ka
	for submit <at> debbugs.gnu.org; Wed, 12 Oct 2022 07:22:39 -0400
Received: from quimby.gnus.org ([95.216.78.240]:50402)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oiZor-0000Bo-T6
 for 58440 <at> debbugs.gnu.org; Wed, 12 Oct 2022 07:22:38 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=8Y+ZXBD+ANnGIMdOwLkMOmEf2tInoj0/Rrjq/PZXZ0A=; b=IRx6hHccNRiAgqhr+roBiS8ob0
 uHfXmmEoEeknG1ghBBCVqw2L6j/v1YNACB84AHkXUEe55mJn29XzJsqQaER2DHGHZrgsUp7j80Cwj
 pZPI/iTxE48OA8Zt22pUW3/tYnyqeYtd4sZr1BX85hWaBdTh0TsLdLq6L4vnkoPFjSjE=;
Received: from [84.212.220.105] (helo=downe)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oiZoj-00068n-AI; Wed, 12 Oct 2022 13:22:31 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Morten Welinder <mwelinder@HIDDEN>
Subject: Re: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
In-Reply-To: <CANv4PNnm3XUPdWnhv_-b3ENv7Ms7LsqB2NY3pxr_mV1EvF1qJQ@HIDDEN>
 (Morten Welinder's message of "Tue, 11 Oct 2022 09:48:37 -0400")
References: <CANv4PNnm3XUPdWnhv_-b3ENv7Ms7LsqB2NY3pxr_mV1EvF1qJQ@HIDDEN>
X-Now-Playing: Nobukazu Takemura's _Music for the exhibition "Einheit"_:
 "(untitled)"
Date: Wed, 12 Oct 2022 13:22:28 +0200
Message-ID: <87czaxcmmj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Morten Welinder <mwelinder@HIDDEN> writes: > 1. Create
 the following perl script named "ttt": Or an easier way to reproduce the
 issue: Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58440
Cc: 58440 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Morten Welinder <mwelinder@HIDDEN> writes:

> 1. Create the following perl script named "ttt":

Or an easier way to reproduce the issue:

./src/emacs -Q; echo $?

and then "kill -INT" the process and observe that it echoes "0".

This issue is still present in Emacs 29.

It does seem like a bug -- I'd expect a non-zero exit code in this case.
Eli, what do you think?

(And...  I'm not sure where the action taken for the signal really is
after poking at the

  maybe_fatal_sig (SIGINT);

code paths a few minutes.)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Oct 2022 13:49:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 11 09:49:02 2022
Received: from localhost ([127.0.0.1]:51448 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oiFd0-0003Dk-9X
	for submit <at> debbugs.gnu.org; Tue, 11 Oct 2022 09:49:02 -0400
Received: from lists.gnu.org ([209.51.188.17]:53390)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mwelinder@HIDDEN>) id 1oiFcv-0003DS-3u
 for submit <at> debbugs.gnu.org; Tue, 11 Oct 2022 09:49:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51370)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mwelinder@HIDDEN>)
 id 1oiFct-0000aK-Jk
 for bug-gnu-emacs@HIDDEN; Tue, 11 Oct 2022 09:48:56 -0400
Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:39752)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <mwelinder@HIDDEN>)
 id 1oiFcq-00022O-D4
 for bug-gnu-emacs@HIDDEN; Tue, 11 Oct 2022 09:48:55 -0400
Received: by mail-ej1-x632.google.com with SMTP id b2so31518941eja.6
 for <bug-gnu-emacs@HIDDEN>; Tue, 11 Oct 2022 06:48:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=q2xo5Y6UXIG5jYLcZV9QMlq1/BjLRBsipd4Vwjsy4uQ=;
 b=PsXV3fxZ6uvq2n4MiyLE9NgsZyx13yHYwYE0g9I3gUEiPEHkrtnU3B/gG5w5cnXvmT
 gGH9bpaev+81wksLd30XfK45CAvg5f+cs0ku9qP4IUp1sY18r2LbuDFDoiEpPnPhoFby
 sxhwp+8tXtYX9/sDGItFTuzyfvKegCaDYqxhALspR+SEVfha8evne5Otapz36BP5rOR7
 GwNZkZUlesGLIIYExVYlV8v+KwSkzEEnTgxx0mD6F44cvJxgHSmsGCu9/NU96fPTjyRM
 qmFzbXgBKegcSR3W+sx93ckc7sRiBifzHmnDdoTjVa1zxYTMDfOuw3wGVuLpUiBgd/yu
 I/RA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=q2xo5Y6UXIG5jYLcZV9QMlq1/BjLRBsipd4Vwjsy4uQ=;
 b=FioOPlR2f69198QSdlqH/MUEJmYRFKt8duWJPWJCzM+taOO8wKAzdkjzpML9MGI8+q
 lgHl5iy4i5DD7W/xPhDOH0+BvIqeBjjh26S6U7sHxQ0++/ObzyQ+mPEFX+NLzR6sOKKu
 a5opmF6A2bMkPOL1Mid8l8yOraBbUwpSdPr3vWd1zfjvr4JRSZDZ0I1eO0krFhcexVfD
 bemnbN1VsIJIbwQQc9BBYn7KHEjv1/pyAOTZp17E6oEo4MJEDEldwFja9uibBVij4hGo
 hIUl4KxZIo2k348qdwXQQCv/fkjtpydXx+fiGPvRCvQrK7a0Rf6knhBZMCjBf3VZS790
 yEmA==
X-Gm-Message-State: ACrzQf3RsFZT3Cs/+GK0hrAS/KyGATarR0tpHpT8hrG5EgT0e2PmqNEI
 mFrpMlfMBmkgLeLj4LqvnCZjS2kmkc6FG5fBNQIfmbfyhSA=
X-Google-Smtp-Source: AMsMyM4L0GMxjNsHQB2xlgONMElpm8+YBDI4qGrDZSHVFJn0o5e3miAK19W7Nyjbr0xW8ioi4CS0AWC2NpXYuwgTzq0=
X-Received: by 2002:a17:907:3f09:b0:78d:c7d7:af72 with SMTP id
 hq9-20020a1709073f0900b0078dc7d7af72mr6110650ejc.730.1665496128959; Tue, 11
 Oct 2022 06:48:48 -0700 (PDT)
MIME-Version: 1.0
From: Morten Welinder <mwelinder@HIDDEN>
Date: Tue, 11 Oct 2022 09:48:37 -0400
Message-ID: <CANv4PNnm3XUPdWnhv_-b3ENv7Ms7LsqB2NY3pxr_mV1EvF1qJQ@HIDDEN>
Subject: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a00:1450:4864:20::632;
 envelope-from=mwelinder@HIDDEN; helo=mail-ej1-x632.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

1. Create the following perl script named "ttt":

#!/usr/bin/perl -w
use strict;
my $rc = system($ENV{EDITOR});
my $err = $?;
print STDERR "\nrc=$rc  err=$err\n";

2. Run   EDITOR='/usr/bin/emacs -Q' ./ttt
Emacs comes up normally

3. In shell window, press Ctrl-C
Observe: "rc=0  err=0"
Expected: non-zero values

4. Run   EDITOR='xterm -e /usr/bin/emacs -Q' ./ttt
Emacs comes up normally as does an xterm window

5. In shell window, press Ctrl-C
Observe: "rc=512  err=512"
This is what's expected.


M.






TL;DR for below: openSUSE Leap 15.4 system; no local changes

In GNU Emacs 27.2 (build 1, x86_64-suse-linux-gnu, GTK+ Version
3.24.31, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: openSUSE Leap 15.4

Recent messages:
[irrelevant -- different process]

Configured using:
 'configure --disable-build-details --with-pop --without-hesiod
 --with-gameuser=:games --with-kerberos --with-kerberos5
 --with-file-notification=inotify --with-modules --enable-autodepend
 --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
 --datadir=/usr/share --localstatedir=/var --sharedstatedir=/var/lib
 --libexecdir=/usr/lib
 --enable-locallisppath=/usr/share/emacs/27.2/site-lisp:/usr/share/emacs/site-lisp
 --with-x --with-xim --with-sound --with-xpm --with-jpeg --with-tiff
 --with-gif --with-png --with-rsvg --with-dbus --with-xft --without-gpm
 --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 --x-includes=/usr/include --x-libraries=/usr/lib64 --with-libotf
 --with-m17n-flt --with-cairo --with-xwidgets --build=x86_64-suse-linux
 --with-dumping=pdumper 'CFLAGS=-fmessage-length=0 -grecord-gcc-switches
 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables
 -fasynchronous-unwind-tables -fstack-clash-protection -g -D_GNU_SOURCE
 -DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS
 -pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label
 -fno-optimize-sibling-calls -fno-PIE -DSYSTEM_PURESIZE_EXTRA=55000
 -DSITELOAD_PURESIZE_EXTRA=10000 -DPDMP_BASE='\''"emacs-gtk"'\'''
 'LDFLAGS=-Wl,-no-pie -Wl,-O2''

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LC_NUMERIC: POSIX
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix

Major mode: Perl

Minor modes in effect:
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/usr/share/emacs/site-lisp/site-start.d/lilypond-init hides
/usr/share/emacs/site-lisp/lilypond-init

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x
cl-loaddefs cl-lib perl-mode paren preview-latex auto-loads tex-site
ispell delsel lpr easy-mmode pcase tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting xwidget-internal cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 51780 9816)
 (symbols 48 6350 1)
 (strings 32 17400 2316)
 (string-bytes 1 943121)
 (vectors 16 10821)
 (vector-slots 8 176612 9102)
 (floats 8 24 40)
 (intervals 56 326 0)
 (buffers 1000 13))




Acknowledgement sent to Morten Welinder <mwelinder@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#58440; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 13 Oct 2022 14:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.