GNU bug report logs - #55619
[PATCH] gnu: smlnj: Fix use of Ctrl-c in sml REPL.

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: guix-patches; Reported by: Foo Chuan Wei <chuanwei.foo@HIDDEN>; Keywords: patch; dated Wed, 25 May 2022 01:46:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at submit) by debbugs.gnu.org; 25 May 2022 01:45:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 24 21:45:20 2022
Received: from localhost ([127.0.0.1]:53920 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ntg5Q-0000Pq-5R
	for submit <at> debbugs.gnu.org; Tue, 24 May 2022 21:45:20 -0400
Received: from lists.gnu.org ([209.51.188.17]:51946)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <chuanwei.foo@HIDDEN>) id 1ntg5L-0000Pg-8d
 for submit <at> debbugs.gnu.org; Tue, 24 May 2022 21:45:18 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48576)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <chuanwei.foo@HIDDEN>)
 id 1ntg5I-0002zi-Hm
 for guix-patches@HIDDEN; Tue, 24 May 2022 21:45:14 -0400
Received: from mail-tyzapc01olkn2077.outbound.protection.outlook.com
 ([40.92.107.77]:2690 helo=APC01-TYZ-obe.outbound.protection.outlook.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <chuanwei.foo@HIDDEN>)
 id 1ntg5E-0001vj-HQ
 for guix-patches@HIDDEN; Tue, 24 May 2022 21:45:11 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Q6QzP+zK2q+NTKYTVc2ScXTRjzX2ADNzfmrRCWv7yCvxxzzvZ2sHbZqE+fcaVAG3XSs2AEIvPdeccJkRffb/Tg7Rez1ttcx0l8R8x4diH2KhjryL47w8j/6nqkAcECW0leXWttShDJt5O/kAcb4ZGgbGTxauT70wBDUJOkHDRUOdbyouU2p6O0ReSAEgJey6KFz3NXyUrRPxaL0eoKM0feHe3LsBg7Hw086opwv524WK2GNrt53mQsZDjXOJQohlgcIOpj/AKDdKtkunBDSOx6wMwGZilSOEBEvZKLD54u7etgqrrq8btZcBAauLsWdfpRsWxydRiIHBA8POqY0D8Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=Q/tqM25bi0EscSULi+VoACp2rEtTF4rL2QfwCuzxtHo=;
 b=M2OWu+mBLsJrDXedAc96n9xGB+G9TuqIGAFun2UgGfNpqAJLoZKTLPIOfMTDTh9XCNrKaMBkq18p9Cqy5yjf3tvI5Wcgiei4EFVxlHTMt5C58OjqIrvA9q9RbGXYUHRCnbRCyygbQF2NOC2V2EC/+oNxJCfxI8CEjnNd7c7fZjze4lMl6G/PeZM1A+QZDa1CnXsawKa+AHr+tNTLt2qRjHSOJlc5TsHBPQbQL0/QM38lF72K941lbyqP4FMGD6peDE3dokfPR6TEz/BcDTRdDHqaaYV5DW1ygE4duljxkZiJhkz1etd1nPHlOW8q0qWtsXiv5dATrag0C/xENLXixQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=Q/tqM25bi0EscSULi+VoACp2rEtTF4rL2QfwCuzxtHo=;
 b=dL3E5ILZGrP3qnhDoMlHE3q7lbcvHqJIn1a8zR2J4ezpgqzzWnd2ZidADcvoonh0jf3c7/ga6Y4OkfJDWAQCYIoLCTWCfb9D6HL3bCedOzHSadOSbogGBtV3/VAueOIIwH5rFZchiBfXqh6Cif0SBQ9XvUDVN3KaqHLUXW2JAAW486KdTr7Tr9cMM94maBYrG1bkn5BnMjbPHCwLDPauWanErEGQ7YHqSz01R7gJfFYEyT6fXuzLzDUN4Wc2yUgWZK+5ssxCD7zNpne5QWDURPsgn4d1cpfde461DRpxAFWPU5FAOEYUPuTYNqZnYQLHUXQUDsaqFsxEzc/TrKEM1Q==
Received: from PU1PR01MB2155.apcprd01.prod.exchangelabs.com
 (2603:1096:803:1c::21) by TY2PR0101MB3568.apcprd01.prod.exchangelabs.com
 (2603:1096:404:8007::13) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Wed, 25 May
 2022 01:45:04 +0000
Received: from PU1PR01MB2155.apcprd01.prod.exchangelabs.com
 ([fe80::fc2a:6e5a:d929:f3a7]) by PU1PR01MB2155.apcprd01.prod.exchangelabs.com
 ([fe80::fc2a:6e5a:d929:f3a7%6]) with mapi id 15.20.5273.023; Wed, 25 May 2022
 01:45:04 +0000
Date: Wed, 25 May 2022 01:44:59 +0000
From: Foo Chuan Wei <chuanwei.foo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: smlnj: Fix use of Ctrl-c in sml REPL.
Message-ID: <PU1PR01MB21558F43DCE101CA76C722DA8DD69@HIDDEN>
Mail-Followup-To: guix-patches@HIDDEN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
X-TMN: [aVNKVe0aeLcf7oyGci1kYOhLkutNmfqs]
X-ClientProxiedBy: SG2PR06CA0188.apcprd06.prod.outlook.com (2603:1096:4:1::20)
 To PU1PR01MB2155.apcprd01.prod.exchangelabs.com
 (2603:1096:803:1c::21)
X-Microsoft-Original-Message-ID: <20220525014459.rut6k23lhrvnwe4k@main>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: ebf5ef70-7005-4b79-b8f8-08da3df02f22
X-MS-TrafficTypeDiagnostic: TY2PR0101MB3568:EE_
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: C39QraMgM3lZPy5h41y7n/Bojf5VX9pm+BRZK+eVYlF/5CdWtB+6GjljrNDXfpUxZ3LRs0nDcPt+ZhMXXxKsT4zc42insGNGvNqOOe6ZRxTgesLg7bKcJq9Kz/uWhFle4saXVLXayQ3UmxWqTAVUi2exm+ziqGzfQ+thiJCDB7XplCB9BpdWZ2HsJo6Wt51TM2Ucj3fKvG+sAqIgwusAqb3w7WdpmkAKDso2ymVOvAcX9+GwLBjQps42ZH3XE5KuRM0Jr4QBeY5huLJsJbxmtNqbjwrAjgiIfouaXzrCnNQjpf3Tftvwc/w9o60ok2AzQvh4o+oznA5kmjzCHy2xW90t7IDq7nzIxZfSkTPiw2Mt4bvavvNJTPz3PMeOty+RWdrtVovm6lZsADTtigLVOOy9c+Fr8T3GZc84qbpQ4DXn3ISEoKioGLE5aaxaLkEOvCF5arp0EL54syg2q7Lt5pHitS4/GmrAsMaUUZZj/VqE7d0ubaBxBpRcmRI+6rXs5glAaA/uSgEKJlf90/tZ3Ib3GGVOXcqzAUq7LbjRmzR7IrU3RI2VPyqtyDEl2pyauSFqvA6FbV5e0n8TMVLMAn350OPMlBRbJZNpYZkThIc6Qogmsr7agA78iKK1vQ2I
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?akdKSHpIREcxVVp5WVVjSW1zZ1pPcDlsRVEwZlF6QzlzRDlFblBOR213aUdH?=
 =?utf-8?B?ZEZv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jgrK203?=
 =?utf-8?B?d0UwVndCa1BvL0MyTU8xV1RIaHdsZW9qZk90TWltNVlZZndWZ1Zsa2g4Mmpq?=
 =?utf-8?B?dkxmU3hySHZsd01WcStUUlZJTkVaM0cvMjgwcE80ZkQxUk1NUENidm9qVmNL?=
 =?utf-8?Q?o6F5/5bv4TeAf83B8GcGS0Jvbqyumys9?=
X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-d8e84.templateTenant
X-MS-Exchange-CrossTenant-Network-Message-Id: ebf5ef70-7005-4b79-b8f8-08da3df02f22
X-MS-Exchange-CrossTenant-AuthSource: PU1PR01MB2155.apcprd01.prod.exchangelabs.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2022 01:45:03.7657 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR0101MB3568
Received-SPF: pass client-ip=40.92.107.77;
 envelope-from=chuanwei.foo@HIDDEN;
 helo=APC01-TYZ-obe.outbound.protection.outlook.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_PASS=-0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.2 (/)
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 (--)

* gnu/packages/sml.scm (smlnj): Fix use of Ctrl-c in sml REPL.
---
Related mailing list thread:
https://lists.gnu.org/archive/html/guix-devel/2022-05/msg00209.html
("Why does sh in the build environment ignore SIGINT and SIGQUIT?")


 gnu/packages/sml.scm | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/sml.scm b/gnu/packages/sml.scm
index 04411c02c3..94a65961d6 100644
--- a/gnu/packages/sml.scm
+++ b/gnu/packages/sml.scm
@@ -175,10 +175,22 @@ function interface, and a symbolic debugger.")
                        "sml.boot.amd64-unix/SMLNJ-BASIS/.cm/amd64-unix/basis-common.cm"))
 
              ;; Build.
-             (invoke "./config/install.sh" "-default"
-                     (if (string=? "i686-linux" ,(%current-system))
-                       "32"
-                       "64"))
+             ;; The `sml` executable built by this package somehow inherits the
+             ;; signal dispositions of the shell where it was built. If SIGINT
+             ;; is ignored in the shell, the resulting `sml` will also ignore
+             ;; SIGINT. This will break the use of Ctrl-c for interrupting
+             ;; execution in the SML/NJ REPL.
+             ;; Here, we use Guile's `system` procedure instead of Guix's
+             ;; `invoke` because `invoke` uses Guile's `system*`, which causes
+             ;; SIGINT and SIGQUIT to be ignored.
+             (let ((exit-code
+                     (system (string-append "./config/install.sh -default "
+                                            (if (string=? "i686-linux"
+                                                          ,(%current-system))
+                                              "32"
+                                              "64")))))
+               (unless (zero? exit-code)
+                 (error (format #f "Exit code: ~a" exit-code))))
 
              ;; Undo the binary patch.
              (for-each

base-commit: d129d962e437fd215c5e9428fc1b26e2d72ffbda
-- 
2.25.1





Acknowledgement sent to Foo Chuan Wei <chuanwei.foo@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#55619; Package guix-patches. 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: Wed, 25 May 2022 02:00:02 UTC

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