From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gLfVKZ5sf2VNbwEAkFu2QA (envelope-from ) for ; Sun, 17 Dec 2023 22:48:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id EF0ZJJ5sf2VzyQAAqHPOHw (envelope-from ) for ; Sun, 17 Dec 2023 22:48:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Tk3G9LvO; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702849694; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=zJYCGtK98kqmNoEUDWkuaGVZcFNPRQg/N4mKglh5M3I=; b=Rk4M3UXYNmo7GTAe0KVg40oUBE70+XEdmu+0I/AmZUyLyq2ZF5vPXOUBXxYm8FIuwRylAD aRx2lB9kDgECKnZClfE16SM/QXpSwrF+wq9l+bmvy4ScLd9L8dE/zxrtgsd7LwZCBduLbV Ngf/6K+1lq2kyUYOgLBoQeyRL7TZnpuUeDDfa/ttxP5xSAmcTQiwyUBihxxX3YAirZFJPT 3+rELlbioafCEEuFCzZQHQq/nrPyXxM/lF8d26Zy9+HzFebgGGX2OQH8a1DgYsCat36xp+ 9O3TInOvs9viCkm/SRD7RFp87//9VKzEtp33y8JjG9lHeg9Vco+olX6Ca75YyA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Tk3G9LvO; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702849694; a=rsa-sha256; cv=none; b=Kmvhci0V20wyzJZjXtiDbwM2furSrOd5ZtHbaVvxeEjRSQO9wOdEDSX0O5+02VXnSS+EfQ 5YiI24h+uEip4h9ONLeUNyMEYaXrU2Lj+wpsTM0Mi/q+XtLN+9ogqqc9o9xdMlILK6NJAS Y6zduRlwiS+IOUgTSeErTeE9vvMNypkcT3+obZIAiUGsYaS0jgkLcsVhSG7YzXtCI8NEsX u9QUKUKAnNS1i0SMeS9ujYuD6q9hnCN4zQiYhNzoVOpCgeve34Tebltz5m15Q1pfM8EjyN fQJrbjjXfXiXP9KR5e4+ZAtk8XTfvHxzhjVn9o4K3haSfZIXBmKQztVHQpg5eg== 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 4BBF825DC9 for ; Sun, 17 Dec 2023 22:48:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEyzT-0002BC-5D; Sun, 17 Dec 2023 16:48:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEyzR-0002AX-Op for bug-guix@gnu.org; Sun, 17 Dec 2023 16:48:01 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEyzR-0007Tc-GQ for bug-guix@gnu.org; Sun, 17 Dec 2023 16:48:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEyzS-0002LZ-DF for bug-guix@gnu.org; Sun, 17 Dec 2023 16:48:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#30948: [PATCH core-updates] build-system/gnu: Turn PID 1 into an =?UTF-8?Q?=E2=80=9Cinit=E2=80=9D-style?= process by default. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 17 Dec 2023 21:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30948 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 30948@debbugs.gnu.org, Carlo Zancanaro Received: via spool by 30948-submit@debbugs.gnu.org id=B30948.17028496238781 (code B ref 30948); Sun, 17 Dec 2023 21:48:02 +0000 Received: (at 30948) by debbugs.gnu.org; 17 Dec 2023 21:47:03 +0000 Received: from localhost ([127.0.0.1]:59085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEyyV-0002HY-As for submit@debbugs.gnu.org; Sun, 17 Dec 2023 16:47:03 -0500 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:52419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEyyT-0002H3-3Y for 30948@debbugs.gnu.org; Sun, 17 Dec 2023 16:47:01 -0500 Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-4260b657ed5so25123571cf.0 for <30948@debbugs.gnu.org>; Sun, 17 Dec 2023 13:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702849614; x=1703454414; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zJYCGtK98kqmNoEUDWkuaGVZcFNPRQg/N4mKglh5M3I=; b=Tk3G9LvOfV/ssR3DqaT3jPVwd6aILWY62Lm04iE2nuoV7Z8Ru9zaD2ujoqNGjzykUs Js9EvIMNLhvt2M221mLfrbuyk9biGiolvrV+5+ohase9oCvKkudAx++ifxX+l9c6Foy1 FIrkxwPZ6t3sWWZPk3EbDOvZE4C9lAsIopko86qIlKSE8Q+miGdp5IvWTD8DtcchlDJ2 x4fOwKvEU0nKXI2rb13le2pCFkj2+MnlJhf+wSfQ9wreIdQpcZo09FKXlEYBjR7WX9CW aaSWdjAaNq2H7dhh+sWGKANxDK88kHp0fuplFiQ4l1nVIwn62nMbeFnR233n4P80nTwt vONg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702849614; x=1703454414; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zJYCGtK98kqmNoEUDWkuaGVZcFNPRQg/N4mKglh5M3I=; b=W2KyDRrEu4mMWKVvPtRY8mrqOAC8OVOrQv6tzynqbSlehui3ppDqopEHn0fW7gnwxN H+JAWvkGs7SBqbTQDhuZgtJB6R4j9YR/gm/H6yfht2llseSOZIk5cfnx6u5RPonY4TyD 4UELtBQoXSiJmn2wAQdEu1rapawDSktTLrcFzQf43kITNVmnSc12BCgaK8dNIbxbCfIT syC6i0GjWydAk7GBULj/ZyWuctX5JEM01ZssFYDYcHTQ/0Nm2HeLvt81aCbux9dmsBxh vcU2GgUMB0ZORQluHMMZkmAhrA+nxqUuaSisRAmRSKH3zpcf+QPEXZN4YxEs74pl83p/ cIMw== X-Gm-Message-State: AOJu0YyC7UGa/fAhej9iNXtzKRBGGjzhdI0YsWw3dDmjdPDUejXi1CcJ EKSHEJ7ctOd37VQJykNlm26hZt5ZZCs= X-Google-Smtp-Source: AGHT+IEW3lc5HB+okPdkrhI5AA3f1ZQBgZNq+Nu/yLTbX+6nXdGU3hDaBlmcKe3YYC7R1YHyehDRxQ== X-Received: by 2002:ac8:57ce:0:b0:425:9903:80c with SMTP id w14-20020ac857ce000000b004259903080cmr22991382qta.20.1702849613806; Sun, 17 Dec 2023 13:46:53 -0800 (PST) Received: from hurd (dsl-205-236-230-90.b2b2c.ca. [205.236.230.90]) by smtp.gmail.com with ESMTPSA id cj10-20020a05622a258a00b004259bbf166esm8607526qtb.63.2023.12.17.13.46.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 13:46:53 -0800 (PST) From: Maxim Cournoyer In-Reply-To: ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 17 Dec 2023 21:23:52 +0100") References: <87lenvce8r.fsf@gnu.org> Date: Sun, 17 Dec 2023 16:46:51 -0500 Message-ID: <87v88w7b90.fsf@gmail.com> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.12 X-Spam-Score: -5.12 X-Migadu-Queue-Id: 4BBF825DC9 X-Migadu-Scanner: mx10.migadu.com X-TUID: 08NQ9aHQhel5 Hi Ludovic, Ludovic Court=C3=A8s writes: > Fixes . > > * guix/build/gnu-build-system.scm (separate-from-pid1): New procedure. > (%standard-phases): Add it. > * guix/build-system/gnu.scm (gnu-build): Add #:separate-from-pid1? and > honor it. > (gnu-cross-build): Likewise. > > Reported-by: Carlo Zancanaro > Change-Id: I6f3bc8d8186d1a571f983a38d5e3fd178ffa2678 > --- > guix/build-system/gnu.scm | 4 ++++ > guix/build/gnu-build-system.scm | 39 ++++++++++++++++++++++++++++++++- > 2 files changed, 42 insertions(+), 1 deletion(-) > > Hi! > > This is a second attempt I=E2=80=99m currently testing as part of an > initially unrelated =E2=80=98core-updates=E2=80=99 series: > > https://issues.guix.gnu.org/67824 > > The principle is simple: if the build process runs as PID 1, fork > so that PID 1 does nothing but call =E2=80=98waitpid=E2=80=99 in a loop w= hile the > actual build process runs as PID 2. > > This is simple and robust. The code is written in a defensive way > as an extra phase that can be disabled. > > Thoughts? I haven't yet looked at the code, but looking at the bigger picture, wouldn't it be a useful behavior to have for Guile itself? Perhaps not, as there already exists a Guile init manager (GNU Shepherd), but if it's something relatively simple/compact to implement, perhaps it could find its place in Guile itself, just like Bash implements correctly signal handling when used as a PID 1 (if I'm not mistaken). --=20 Thanks, Maxim