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 ms9.migadu.com with LMTPS id OF8tLMRkCWRemAAASxT56A (envelope-from ) for ; Thu, 09 Mar 2023 05:47:00 +0100 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 AJdBLMRkCWR3YAAAauVa8A (envelope-from ) for ; Thu, 09 Mar 2023 05:47:00 +0100 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 8F7B32E1D6 for ; Thu, 9 Mar 2023 05:46:52 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=temperror ("DNS error when getting key") header.d=tilde.club header.s=mail header.b=xs2IJJh1; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=temperror reason="query timed out" header.from=tilde.club (policy=temperror) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pa8AL-0003az-PO; Wed, 08 Mar 2023 23:46:09 -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 1pa8AK-0003a2-Cg for guix-patches@gnu.org; Wed, 08 Mar 2023 23:46:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pa8AK-00043D-54 for guix-patches@gnu.org; Wed, 08 Mar 2023 23:46:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pa8AK-0002f1-03 for guix-patches@gnu.org; Wed, 08 Mar 2023 23:46:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61803] [PATCH 0/3] [shepherd] improve race-free spawn+wait Resent-From: Ulf Herrman Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Mar 2023 04:46:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61803 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 61803@debbugs.gnu.org, Ulf Herrman Received: via spool by 61803-submit@debbugs.gnu.org id=B61803.167833716610202 (code B ref 61803); Thu, 09 Mar 2023 04:46:07 +0000 Received: (at 61803) by debbugs.gnu.org; 9 Mar 2023 04:46:06 +0000 Received: from localhost ([127.0.0.1]:50633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pa8AF-0002dr-1G for submit@debbugs.gnu.org; Wed, 08 Mar 2023 23:46:06 -0500 Received: from tilde.club ([142.44.150.184]:47708 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pa7HO-00015g-DO for 61803@debbugs.gnu.org; Wed, 08 Mar 2023 22:49:25 -0500 Received: by tilde.club (Postfix, from userid 5378) id 841CD22310E14; Thu, 9 Mar 2023 03:49:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 tilde.club 841CD22310E14 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.club; s=mail; t=1678333760; bh=ptLuDpN3X/ECugzjXCyRhIPWxPsoXmEZuScz5N4SV44=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=xs2IJJh1eSPYKJe4B8m49ASSBangvpAIjkTTsVXTkoBxN+Z4W06uw3wZixuI7ovwR m+YpQ+D/LZ5XEtHsBnKNvAp7Hh2X10ScEsGzuXebQQPn41WJy7aIgL8Yip4sPAx3Vm I4cc8QZOIlHvtTiuceHfPVTafVJczv36Rl9+Znlg= From: Ulf Herrman References: <87cz5x1jr2.fsf@tilde.club> <87h6v23ike.fsf@gnu.org> Date: Wed, 08 Mar 2023 21:48:54 -0600 In-Reply-To: <87h6v23ike.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 02 Mar 2023 23:16:33 +0100") Message-ID: <878rg61t5l.fsf@tilde.club> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Mailman-Approved-At: Wed, 08 Mar 2023 23:45:48 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 8F7B32E1D6 X-Spam-Score: -3.80 X-Migadu-Spam-Score: -3.80 Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: 5otwqYqbmYch --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: >> From 177592ee9d4b7fc6dcc80e545e8ad615a1d6786c Mon Sep 17 00:00:00 2001 >> From: ulfvonbelow >> Date: Sat, 25 Feb 2023 00:56:57 -0600 >> Subject: [PATCH 3/3] service: add spawn-shell-command replacement for >> `system'. >> >> We already have a replacement for `system*' that avoids racing, but not = for >> `system'. >> >> * configure.ac (SHELL): new substitution variable. >> * modules/shepherd/system.scm.in (%shell-filename): new variable. >> * modules/shepherd/service.scm >> (spawn-shell-command, real-system): new procedures. >> * modules/shepherd.scm (main): replace `system' with `spawn-shell-comman= d'. > Out of curiosity, do you have a need for =E2=80=98system=E2=80=99? I don't. > I=E2=80=99m inclined to recommend against its use, in which case this pat= ch is > unnecessary. I tend to agree, but make-system-constructor and make-system-destructor both use it and are documented in the manual, so we should either make them work properly or remove them. >> +(define %shell-filename "@SHELL@") > > This is the configure-time shell so it will be wrong when > cross-compiling. > > I=E2=80=99d just do: > > (define %shell (or (getenv "SHELL") "/bin/sh")) > The rationale behind not taking that straightforward approach was to closely emulate the normal behavior of 'system' on guix, where the shell path used is a hardcoded store path, though since guix's libc is likely the only one where this is anything other than /bin/sh, I suppose it does make a lot more sense to patch it in the guix package definition (or accept the minor behavioral difference) than to try to automagically figure it out at configure-time, which also has the problems you mentioned. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHIBAEBCAAyFiEEn6BUn0yca1D9JsMa1lV76sJM9mgFAmQJVyYUHHN0cmluZXNz QHRpbGRlLmNsdWIACgkQ1lV76sJM9mjyagv+LCgotxnqeNPwMzd6Fj42twBH6FAS jczDRUd03kKnr0colb/1/4U/14E99MhbQhyrtKrjwMxhvNg2CfU4f4Gsj/McrqeG Livn2lvciUB9psr8CXfs6eEhr1yVCb9khlGbEXzNoAjcCINldMIXf/qcMNtIfN5L 9sQC7c44bjnwqXqpLBttbcm6IltCgCOkFmMa5OKqgugWjxbyLV60LyWbXMGs7nVt Uys6U3nDhu2gC8pcMm3Q25xt14KcsRKz4YmTzlK3M+JAkIW63VYMNm0ryqO2a+az XQ+agSHLZSSPIGYMpfKpjKz5m4wQHExAjBM5bX0WedTXdqv5tpFK4ItQve9mYuu0 VFbyEzjztP6N6M+Fs4cmokOyE4hqGzoEFQDIV9l7qFsRWomMBD4AX6LK2LbPbwUU +0IYIBCO9HZhpdueUFO/Cg/MPFby9jVxkvCHecTYyhNhNV3WCCu3G6xEFZE8KoPN yjHr6f6dbgZImihf0cSg3e5u/3XQyDUpjet5 =2DeH -----END PGP SIGNATURE----- --=-=-=--