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 21227 invoked from network); 17 Oct 2022 23:48:44 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 17 Oct 2022 23:48:44 -0000 Received: (qmail 8761 invoked by uid 89); 17 Oct 2022 23:49:09 -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 8754 invoked from network); 17 Oct 2022 23:49:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antonovs.family; s=20200215; t=1666050514; 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=carc7nT/dDU4e25QxuOO4GyEhLtHiB2rjrGm+1lZPyY=; b=XEuMcfgiVsX13qR+ME6UmYrhZ4ke4dhgn6I2CVq3Pku439Ieieiqfie7TLkZzoe0PNI1b8 qg93DTJylKwMWMQI3a2zYpGlbB/Oou8pzqjtFtgJdZW1sbh7simjE55Obu9uXukwuPZcHz PchTmJwKeLDTMWzHnIZKcvjO0kqAaDc= Date: Mon, 17 Oct 2022 16:49:05 -0700 From: Ihor Antonov To: Peter Shkenev Cc: supervision@list.skarnet.org Subject: Re: s6-rc as user service manager Message-ID: <20221017234905.4rrdwvrxs6pchfdx@localhost> References: <20221017175034.jmwoagcwrd6k4j2r@localhost> <8F72C59D-7F58-4084-94B4-CBEF75421327@disroot.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8F72C59D-7F58-4084-94B4-CBEF75421327@disroot.org> On 2022-10-17 23:42, Peter Shkenev wrote: > ... > 1) User services are services running as a given user and started at a > boot time > This option is a trivial one with s6. > > 2) User services are services defined by users and running supervised > when the user wants it. > You can implement this with s6-usertree-maker [1], which would provide > you with a supervision tree rooted in a system one which can be managed > by user. User will have its own scandir and they can use all commands > provided by s6/s6-rc on their scandir. Thanks Peter, this was actually helpful and enchanced my mental model. I think I get get away for now with a user's tree rooted in the system tree. My graphics environment (sway) can start necessary services when it is started. > > - Minor: a test utility for svscan dir would be nice > > - Minor: a test utility for live dir would be nice > > If you use s6-rc, those are the same directories, filled by s6-rc-init > and changed by s6-rc-update. So the test would actually test those > utilities, I guess. 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. [1] https://github.com/skarnet/skalibs/blob/master/src/libstddjb/fd_lock.c Ihor