From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13540 invoked from network); 18 Oct 2022 03:11:53 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 18 Oct 2022 03:11:53 -0000 Received: (qmail 14628 invoked by uid 89); 18 Oct 2022 03:12:18 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 14621 invoked from network); 18 Oct 2022 03:12:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antonovs.family; s=20200215; t=1666062702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=W4arYaSp6MwmjmXiLPI63LCufQ6ZsWCEgGrgwkJVqVA=; b=FHiYajT/KGscyU6NSOXlC2zCdjpfwfQ3L2L+stTvAoJ0blGBTWrpIYIa1lfGAwrZbg1kzQ 1R2GeYgWAbTwvasynhrkmn9hKLn9gGWtiMBXkUOSu3khTTGK6W/4bzGmfYbwaiKWsMff15 ptsXyptkhVOMU4iO+KuAQc9Mx7AHlBU= Date: Mon, 17 Oct 2022 20:12:13 -0700 From: Ihor Antonov To: Laurent Bercot Cc: "supervision@list.skarnet.org" Subject: Re: s6-rc as user service manager Message-ID: <20221018031213.xa3bluhrx5m45jss@localhost> References: <20221017175034.jmwoagcwrd6k4j2r@localhost> <8F72C59D-7F58-4084-94B4-CBEF75421327@disroot.org> <20221017234905.4rrdwvrxs6pchfdx@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On 2022-10-18 00:58, Laurent Bercot wrote: > > By testing I meant checking if the directory has an active process > > watching it. I believe there is a function in skalibs fd_lock [1] > > that svscan uses to check if another svscan runs there. I think it is > > just a matter of exposing that function as standalone executable. > > There are no executables to test whether s6-svscan or s6-rc are > running on a given directory, because these are not dynamic properties. > By policy, decided by you or your distro, you should *know*, at all > times, whether a given directory is a scandir with an s6-svscan running > on it - or whether a given directory is a livedir with s6-rc running > on it. > If you think a given directory should have an s6-svscan running on it, > then you're right; ensure that s6-svscan is started at boot time, and > write your scripts assuming that it's there. If something fails because > it's not there, that's a bug or a system problem, and needs to be fixed, > not accommodated by your scripts. > These tests made sense in the situation of user's services as systemd does it. (Like answering a question whether another login shell has already spawned svscan) It is indeed not necessary with static user tree. Ihor