From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4G8JFZdFimK//QAAbAwnHQ (envelope-from ) for ; Sun, 22 May 2022 16:15:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id INwRFZdFimL+5AAAauVa8A (envelope-from ) for ; Sun, 22 May 2022 16:15:51 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 04BDF108FA for ; Sun, 22 May 2022 16:15:50 +0200 (CEST) Received: from localhost ([::1]:54858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsmN3-0002QV-A4 for larch@yhetil.org; Sun, 22 May 2022 10:15:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsmMM-0002Q5-1j for guix-devel@gnu.org; Sun, 22 May 2022 10:15:06 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:19193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsmMJ-0003X1-UZ for guix-devel@gnu.org; Sun, 22 May 2022 10:15:05 -0400 Date: Sun, 22 May 2022 14:14:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1653228900; x=1653488100; bh=ZUo2ejCKQ7cYZfm8+jmX7OaqxTiNOx3UkMjBCEZ3qzs=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=W/VSE43AVmHX5L7A0bWG+zD1URFPWV7DujKdTz9kKsSZ6FyiXN5gcbzykAWv194kZ tdSAkdgLwkjD6JJr2EJmX+r3Cp47wxyV1T+OwwrKEsZsDve/E5YzzGzkNpeWdRP30b 03RjDtL9TGSJ9ZmHx+TmDz5S1YaH8K/mL44MhaZHB4QDUhYVRM2pyJBWlZiYAIXHDu rvpzTCqA1qrMXDryhcmcyM9wHNJ8vi1Cp9YUqi/hDwCQIPhkUyiDEi5ggD41/Vrk0x J6uidNTb/BFos6pOmoLgHSqMAE9Yxu0U/wR6fAJZ7ICz29DGlZLwUXtBRjYltp8KaY Tlj4QmfLjh1pA== To: Foo Chuan Wei From: Ryan Prior Cc: guix-devel@gnu.org Subject: Re: Why does sh in the build environment ignore SIGINT and SIGQUIT? Message-ID: <3Lw7OBQIW1WT7otx0UqOHHSducDQfScyqO2KP81NCHVUAmmmsGm9-DaGqGH4FKuCRcBi8vpDTydYEDu2Qk7hBo45CDERStJdavZipGwvmwI=@protonmail.com> In-Reply-To: References: Feedback-ID: 7396961:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.22; envelope-from=rprior@protonmail.com; helo=mail-4322.protonmail.ch 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, 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-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Ryan Prior Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653228951; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ZUo2ejCKQ7cYZfm8+jmX7OaqxTiNOx3UkMjBCEZ3qzs=; b=gusG+T+CUb8zRRpIxYOOlLFTnQW54YhmBQE+Au7XTOGQallbQzQ8F5ujrYi576oa1Y0gFK sus4zZpDyctbg0ILxGzRZXz3myISfX0uBo8QdAXPlTcpKUvRt6lJqFKGERPX3qLVTkj7B0 +yxVQNuKE+2Xrcn9iP5GbIkvvLbHn5REmiJk9y/jRLo9m1dfY8sas6Z4GtauV/PO+UBbik maHnmg2utOQEXot6bq6MMax9lUWdwzaPk/pmqj5W5PdevphtMey9fIAohQn3grn0P0BcVV omv6JC5JKySSwwJSQQf7DmsaZGqIZ99HST3xDW0IEnyqcGDfqyZsc59HNH457Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653228951; a=rsa-sha256; cv=none; b=gM6NlaHAm04RFCJNTfzg+yE4IfvEazfVQNndYQ/A6hOIgTaR20Bh0VUWXK4WRvRu+PWTtS NqR0EnuxgGz0p/SVOX3dVSQJ68YrWS3OK26qNzBEcnCG2z6ilqpIz7VpnNS/GF/1gO8eZT 2LlJV3WegIcHOywdPMeWnzEdfJrjKxY5rmPsIfUSYkeFii9QKDCZgV0rXgaGtaIhKLxMg1 Idq5nq0vGm+QlKeRZlEoPlI/eJq5MucamyQE3QvUdiUjnYUyzWg9a5mXxjyfyB3sPitdxk 7Or/VYNNiFpUDU44uy2tiHNdt3lWsI/HCU1qD2ivUhBV/MzyRZJHQM+4J7ISIw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b="W/VSE43A"; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.85 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b="W/VSE43A"; dmarc=pass (policy=quarantine) header.from=protonmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 04BDF108FA X-Spam-Score: -2.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: DM2damV/tcP5 ------- Original Message ------- On Sunday, May 22nd, 2022 at 8:00 AM, Foo Chuan Wei wrote: > The shell in the environment where packages are built ignores SIGINT and > SIGQUIT. If I add `(invoke "sh" "-c" "trap")` to a custom build phase That executes a shell which traps and then immediately exits. By the next s= tep of the build phase execution it's already gone. The shell isn't ignorin= g you - it's not running at all. > The resulting [smlnj] executable seems to inherit the > signal dispositions of the shell where the executable is built, with the > result that CTRL-C is ignored at the sml REPL. How would it know what some other process would do in response to a signal?= Sounds extremely cursed.