From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id ULI6HTU1bWerMQEAe85BDQ:P1 (envelope-from ) for ; Thu, 26 Dec 2024 10:51:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id ULI6HTU1bWerMQEAe85BDQ (envelope-from ) for ; Thu, 26 Dec 2024 11:51:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=tvh67fYi; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=CNiifng+; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735210293; 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=eWhXL2e8xLpVM+QcwosQr9vYBLqcyy6gpsKNWxAUUbo=; b=dx3a7NFD4Ibi1Y0twYXYXu0cTfaQOhl8zD/K28VHW2IAYWwZfV6a32mF40Py7XtP1NYTLW TmRQ8qhOOA7hapCL9+9I1MFu79WvQqPbx2CZ91NLRrRgII66OZN9CUomVbkhwVMXNLMt1a x97KKUFpM0/tcEglN1klV4uGPuDm3G0ppmQunPvr7PXncl2QNpdQkQrBfZJvQ3BHSDog+U sJyMrNEhKssPuZFMOAzPYmdCBfd7pUSqBymVgoCNG4DKZIf0diJbf8X8Xnm0Di4wZ3CEHx /Quhc2vP9tgbOx0XjfTeLX14rnjZBAlsWhipi1jk8Rs1Na1bWeD19WZ5yMNcYA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=tvh67fYi; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=CNiifng+; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735210293; a=rsa-sha256; cv=none; b=HCJIxX5tkU2K3a3L6tW4fGeP9EmZBdmr7Qxv39CCCif61on2mk4uGSC+yCVX/uoeU8sa4/ x1UDE1MfuEdqxhx/78BbeM8Ubo/OFMpNxjLxkhz+vigTZDotqH63cC0zG5BNXeA0AmKIB2 6/pzuc7HhQ2MYtgpzhRsQHb19R4yOt6MQ1+jtqELHv6+dgd6SlCQD6ddTRYJz+fZRfRqiC m3dS133FwRjKA8QPX6F5/Hs2hv0wpqxhzAuiHxJ78NN5377tJfer84ZE6ydkFiE9lIKk2O QNGhFXJ9maq9frsYsuLftmXP3v7aiL9oEPKeXojsvSaWf7Cp50/WCa5wYwuPSw== 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 46A4F845E9 for ; Thu, 26 Dec 2024 11:51:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQlSN-0002wa-G1; Thu, 26 Dec 2024 05:51:07 -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 1tQlSJ-0002wB-OK for bug-guix@gnu.org; Thu, 26 Dec 2024 05:51:03 -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 1tQlSJ-000860-ER for bug-guix@gnu.org; Thu, 26 Dec 2024 05:51:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=eWhXL2e8xLpVM+QcwosQr9vYBLqcyy6gpsKNWxAUUbo=; b=tvh67fYi/mPjGQLcnhk5Zuj6+ekatMV0U5JIP7f2vCJPmD6++AOa4ZEGBH+S84e9Tq2cauhTx7HR3LZmp0se4Tu+yD+jwqvJhLbj+R8l4ndLxmcN7FRM3t/gXJJJFBkCzBupJofdH/TCMjnvGtFnseNe48YuXmmREmEouI29YLh2PJSHnKFeykYInHJGdTLSEXwQx/9VRyfGL0S6meMhR35HfBVHCRvBnWxkgFc3QJMRgxylXvHu76E9PjcJf+iehtqazBqpYigJ8EZoHEbU1aY+/wb/AolD0ONWdk884GcbNF69heb4mjKKaEg5V6FlGG5fOQ4O0hydlyZ9T5Sx5w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQlSI-0007Jc-8q for bug-guix@gnu.org; Thu, 26 Dec 2024 05:51:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#74912: Shepherd: Growing number of user shepherds when relogging Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 26 Dec 2024 10:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74912 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Tomas Volf <~@wolfsden.cz> Cc: Jake , 74912@debbugs.gnu.org Received: via spool by 74912-submit@debbugs.gnu.org id=B74912.173521021227808 (code B ref 74912); Thu, 26 Dec 2024 10:51:02 +0000 Received: (at 74912) by debbugs.gnu.org; 26 Dec 2024 10:50:12 +0000 Received: from localhost ([127.0.0.1]:40210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQlRU-0007EA-51 for submit@debbugs.gnu.org; Thu, 26 Dec 2024 05:50:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQlRR-0007CI-4E for 74912@debbugs.gnu.org; Thu, 26 Dec 2024 05:50:10 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQlRL-0007sO-0p; Thu, 26 Dec 2024 05:50:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=eWhXL2e8xLpVM+QcwosQr9vYBLqcyy6gpsKNWxAUUbo=; b=CNiifng+pmIPNXIo/JtI sqdU0idVUCGj+lDjOgtZ2OJKVS/XEJHItmlqqyGGABpCufcsWCbX2GvLrR9E63pJBEYf86SUD0lla YNuRVaAgks7+zbP0+6Tq2XnDSZRIZEnF9YGkXGZqoGFWHoNzABW/sJjFGC35zRO2ZVa1OlR/7rb/L 6cT3buvzwvGaSizykJleh9fgEV0WFG5F8Hn32MY+joJRf0qLv7SnqDbD5JjcwC6mlOofdydepSvXc Zmj0Ib9qFDXcUWk0A/aXJw8EJBFjm4GotO3Px7OnP8t+ttiwL4rzhGUcoB2UTLmpsvwGJfHC0iHYh fC0Glph+iiMU2A==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <877c7w7bxi.fsf@wolfsden.cz> (Tomas Volf's message of "Thu, 19 Dec 2024 01:29:13 +0100") References: <87r064ippt.fsf@gnu.org> <877c7w7bxi.fsf@wolfsden.cz> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Sextidi 6 =?UTF-8?Q?Niv=C3=B4se?= an 233 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la Lave X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 26 Dec 2024 11:50:00 +0100 Message-ID: <87o70yzpk7.fsf@gnu.org> 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -8.41 X-Spam-Score: -8.41 X-Migadu-Queue-Id: 46A4F845E9 X-TUID: UP0+Uh2cGNCA Hi! Tomas Volf <~@wolfsden.cz> skribis: > When you have another login session active when you log out and in > again, new shepherd is *not* spawned. I am guessing here but probably > last log out causes XDG_RUNTIME_DIR to be removed (by elogind in my > case), so on log in there is no /run/user/$UID/on-first-login-executed, > so it runs again and starts the shepherd. > > But even if that would be solved, since the runtime directory was nuked, > there is no shepherd socket around anymore, so the (still running) > shepherd from previous login session cannot be contacted by herd. Hmm, when is /run/user/UID deleted? > Of the top of my head I can think of two possible solutions: > > 1. Stop the shepherd on log out. So as we have on-first-login, we would > have on-last-logout. I have no idea how to implement that. Maybe we > could use ~/.bash_logout? Or some PAM thing? Or some elogind thing, rather? But then, how do we make it work on other distros? Maybe on systemd distros shepherd receives SIGTERM or something, in which case it terminates properly. > 2. Shepherd could shutdown gracefully when the control socket is deleted > from the file system. It is arguable how useful running shepherd is > without the socket anyway. I don=E2=80=99t think that=E2=80=99s workable: you=E2=80=99d need to poll/i= notify for the existence of that socket, but even if it exists on the file system, you cannot tell whether it matches the socket you=E2=80=99re accepting on. Ludo=E2=80=99.