From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eE53IUdJgWJSJAAAbAwnHQ (envelope-from ) for ; Sun, 15 May 2022 20:41:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iExpIUdJgWKtGgEA9RJhRA (envelope-from ) for ; Sun, 15 May 2022 20:41:11 +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 2B834122C5 for ; Sun, 15 May 2022 20:41:11 +0200 (CEST) Received: from localhost ([::1]:45592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqJB0-0004QC-Bq for larch@yhetil.org; Sun, 15 May 2022 14:41:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqJ9r-00041C-DZ for guix-devel@gnu.org; Sun, 15 May 2022 14:39:59 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:41625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nqJ9p-0000Oj-Jo; Sun, 15 May 2022 14:39:59 -0400 Received: by mail-lj1-x22c.google.com with SMTP id o22so14914988ljp.8; Sun, 15 May 2022 11:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=NJuCXZnplP4IKIQobp7tdvW4pftMLebBy2N5/VrlT0I=; b=g5zuCwtGDqx/tMMrjxAIYlyS1f9ioYGK11wcjMtBJDY4iD+7e1eli6XMUgox2QdKKQ k+37Og2Kv06QOzzlT604Je83E1zV3UnTqeTCl7Gz13pqk/EnRwP/vgNunL0szFgbICjr 6YUy5n/TGrkiO7E/bkXgpdlJU0BprP7Wi1KdldZ5NK+/+gMSqrx94C3IC4YVVNMnZc/A A3+9iew4ihzlmrC+P2frvnvdZkphwTXItJxD8b084lWJ0haIXgjwGbETI/D+KvM4cz0z sAo64/Gsvz82eSn46MTtVCN9n9k1wHOMT7pWHKVVt2ZcT7v1gInAPRHdAVb+KdCGRcNK S4WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=NJuCXZnplP4IKIQobp7tdvW4pftMLebBy2N5/VrlT0I=; b=3hg4Qvn/fAvH5ggIh192vAewRPfBm2tYxZIAM0oXUVUzjgnMfA6Tipo2q5gMsjN+Kv Z3K9ELhBTzbuxc0FbheL6BxepDYfuzrK4uRWa3NmyTn64CfG6pYBJ0D59+7xAkQin2P8 jzFAC/NO4GPjAtA/DkqagxQM8evC6RHRx/MOz1GBzL5/XLrLWi6BZvWuJbI5rAD7VQ/+ aL8XwME5YftLK8L7KcUUezvj//eEEq07DXoaUfavo91zoSSOHL9KivhhmDzF1nQNSQAu rospS7EdmI9RvFA9h+K7x0AsUSg8dNzXQND7u65Px7LYJXzyFd7FwOB6vNCKpFDfyriH 2PGA== X-Gm-Message-State: AOAM531uT90KWc9AY4Nvs0KtWIMfaKQZx/r8wQGJRvD0fRsgbzYKQ3c2 SyI9unHGTRlR/KSwG45gMqoyl1LSlbkZ6JivyPtFjhKid30= X-Google-Smtp-Source: ABdhPJwPp8sHar5GbZTeRIMXeHm7ypoNe0r5xSAOII+TGGjkkGFBs615JqkBWBKYQJJasB1VSZtNb68pBXyruUlpbWE= X-Received: by 2002:a05:651c:399:b0:24f:18d:5bbd with SMTP id e25-20020a05651c039900b0024f018d5bbdmr8981717ljp.481.1652639993741; Sun, 15 May 2022 11:39:53 -0700 (PDT) MIME-Version: 1.0 References: <87lev3dja7.fsf@gnu.org> In-Reply-To: <87lev3dja7.fsf@gnu.org> From: Kevin Boulain Date: Sun, 15 May 2022 20:39:17 +0200 Message-ID: Subject: Re: Should Guix Home daemonize Shepherd? To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= , andrew@trop.in Cc: guix-devel@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=kevinboulain@gmail.com; helo=mail-lj1-x22c.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, 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: , 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=1652640071; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NJuCXZnplP4IKIQobp7tdvW4pftMLebBy2N5/VrlT0I=; b=G+cptw0Gdy1A+r9wgJhW1RU54eWjuElBvOvS3uQoKOzYekEU50lKoTdeDMby/UxVS5VVYe WqifLi64dA9lw8tMc4lmm5na0AL63fiYTpz8JHR963XRZFKPq8Ln6PJm7a01dC19SVd/wq hhMhFkOnhzb2wPmK4Y8bXhFX38v08yY62YsXTzFUYeRQq4IQmu2klmJrGSElk8DkiVxRYg pROqi0eqvT6Wp6iPhB2wnQ5gI2POilcRVEsGGa8BCkm0Fr056vUIWZ1/+vm7Me7cDmDBIE 4yShEweohKyzHLb5hN+PdUAje4wfomnmJqKHODPlJD2LG+Ctl08E7+2rEtGJcw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652640071; a=rsa-sha256; cv=none; b=ZXTL3IXYMllIib1JlLoOPlzititPaVA1xc34iDUStbs0ELA3EOvEJ6QzRv1DBYbCyxR0LS 5vnjwmfgPqVYWWIsTYOqGu5vLCKSxEJQfMUPnBdwwphGZ3TyzHyPBNMloQ+71ogTSDnd30 RBYdEglLdBirnzFjSlrXfm9N97eDI/iFEddLbv6TaLF1AF9Y9Wd0idIXj7nGh/HG/L308y mMQzGS+DQzE2exkd9KO9J9ngy7SHToe+pQ1MDz5v3NNc3XiitfCD6pvgHyYyf0tA3de6UP LDMPnNE0e3axSB4WCBbCVmUg84ywLRF+Z5aDSnhBCA6lLYHVfwZdFhTg+XR8+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=g5zuCwtG; dmarc=pass (policy=none) header.from=gmail.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: -4.83 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=g5zuCwtG; dmarc=pass (policy=none) header.from=gmail.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: 2B834122C5 X-Spam-Score: -4.83 X-Migadu-Scanner: scn0.migadu.com X-TUID: /z9LvaaOJHIA On Sun, 15 May 2022 at 15:20, Ludovic Court=C3=A8s wrote: > > The extra =E2=80=98setsid=E2=80=99 call LGTM, but why add an extra =E2=80= =98primitive-fork=E2=80=99 > call? Sorry, but don't use this patch. The setsid call makes things slightly better but if Shepherd prints anything (for example, a service's status update), it will crash (IIRC) because stdout still references the terminal. Ideally, exec-command (from the same file) could be used to also close the open file descriptors (including the terminal's) but that's done too late and would also close the control socket (and probably other important stuff). I wasn't quite sure how to work around that while keeping the existing beha= vior. On Fri, 6 May 2022 at 10:07, Andrew Tropin wrote: > > Actually, XDG_RUNTIME_DIR can be provided not only by elogind, but also > by pam_rundir or something similar, however in general it's true, > runtime dir will be removed when session ends. That was my thought at first (for example https://github.com/ifreund/dumb_runtime_dir can create the directory but not remove it, solving a part of the issue). Sadly, we lose elogind's built-in power management and some other packages depend on it anyway.