From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2622 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jeff Newsgroups: gmane.comp.sysutils.supervision.general Subject: where is the right place to run s6-rc from ? Date: Sun, 19 May 2019 23:23:35 +0200 Message-ID: <20190519212334.GI4861@panda> Reply-To: sysinit@yandex.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="246846"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.0 (2018-05-17) To: supervision@List.skarnet.org Original-X-From: supervision-return-2212-gcsg-supervision=m.gmane.org@list.skarnet.org Sun May 19 23:23:41 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hSTHQ-001265-SJ for gcsg-supervision@m.gmane.org; Sun, 19 May 2019 23:23:40 +0200 Original-Received: (qmail 23719 invoked by uid 89); 19 May 2019 21:24:06 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Original-Received: (qmail 23712 invoked from network); 19 May 2019 21:24:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1558301018; bh=0qfPNvou3nP3irn5oKSaun/c5wm6ZEIPSTt2iuoVrDg=; h=Reply-To:Subject:To:From:Date:Message-ID; b=vfGS+pAiHDKs261rDJaTV0r5lHlwCo0ImYXTCdpv4MgaMx+QPLwqI6YgX++OF57kP FZsRrOrp6ZhCeVoUnrUBgZn8xi8hNnGywo98+RzF7Sg9ki0ddG6hi4lP7vQLuio7gL 7fMXeSogJyewLJYRw64Uwjr4vuiLIPFtBsz37iBM= Authentication-Results: mxback6j.mail.yandex.net; dkim=pass header.i=@yandex.com Content-Disposition: inline Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2622 Archived-At: i wonder whether s6-rc (or any other service manager or startup script) should be started from within the supervision tree directly as service (dir) in the scandir ? let us assume we created a service dir "rc" or so in the otherwise unpopulated scandir (except required loggers). it starts s6-rc (or another service manager) from its run script and execs into "pause" or something similar that just pauses until killed. that way it is possible to associate a log service with said "rc" service and when "pause" exits the service manager can be called from the "finish" script to bring down the other services correctly (dunno if this script's output will be logged), in this case shutdown would just mean to stop the "rc" service. of course it would be more natural to make this very service run only once via the "once" file. but i guess such "once" services cannot have an associated logger, right ? another hack would be to make this once service write its output to a fifo that is read by another logging service, could this be s6-svscan's own catch-all default logger ? but when using such a catch-all logger to log s6-svscan's own output there is no need for the "rc" service to have its own logger since everything it outputs goes into this catch-all logger. in case of a run-once service s6-rc would be called from s6-svscan's signal handler scripts again to bring down services. why not ? apparently a good idea ...