From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2897 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Laurent Bercot" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit SIGPWR support Date: Mon, 24 Feb 2020 22:25:50 +0000 Message-ID: References: <20200131043919.GF12551@cathexis.xen.prgmr.com> <20200214131544.tcvmh7tqu4hu2gul@caspervector> <1f198ed8-3682-26cd-e8d5-2efc412afde2@gmx.com> <18110531581952419@sas8-7ec005b03c91.qloud-c.yandex.net> <7003111582476686@vla3-6a5326aeb4ee.qloud-c.yandex.net> Reply-To: "Laurent Bercot" Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="62454"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: eM_Client/7.2.36908.0 To: supervision Original-X-From: supervision-return-2486-gcsg-supervision=m.gmane-mx.org@list.skarnet.org Mon Feb 24 23:25:54 2020 Return-path: Envelope-to: gcsg-supervision@m.gmane-mx.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by ciao.gmane.io with smtp (Exim 4.92) (envelope-from ) id 1j6MAj-000G7x-Oe for gcsg-supervision@m.gmane-mx.org; Mon, 24 Feb 2020 23:25:53 +0100 Original-Received: (qmail 806 invoked by uid 89); 24 Feb 2020 22:26:17 -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 799 invoked from network); 24 Feb 2020 22:26:17 -0000 In-Reply-To: X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrledtgdduheelucetufdoteggodftvfcurfhrohhfihhlvgemucfpfgfogfftkfevteeunffgpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhhrfgggtgfgsehtqhertddtreejnecuhfhrohhmpedfnfgruhhrvghnthcuuegvrhgtohhtfdcuoehskhgrqdhsuhhpvghrvhhishhiohhnsehskhgrrhhnvghtrdhorhhgqeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht Xref: news.gmane.io gmane.comp.sysutils.supervision.general:2897 Archived-At: I purposefully did not add a default SIGWINCH handler, because sysvinit does not come with a default kbrequest in /etc/inittab. I added a SIGPWR handler that performs a regular poweroff because it sounds like a sane default for a power failure. I suppose I could add an empty SIGWINCH script by default, to avoid polluting logs if a kbrequest arrives and s6-svscan fails to spawn the corresponding, nonexistent, script. I don't much like the idea of wrapping every s6-l-i action with a script; if someone wants a kbrequest handler, they can write a .s6-svscan/SIGWINCH file. It's not an obvious configuration switch, but people who know what a kbrequest is and who know that they need one will find it without any trouble. The action for SIGPWR, and for other signals, in s6, is also entirely configurable: the user can modify the .s6-svscan/SIGfoo script themselves. The output of s6-l-i-m is only a baseline, a starting point; it can be tweaked for arcane stuff such as non-default shutdown and kbrequest. However, I was not aware that kbrequest needed a special ioctl call before it can be accepted, so thank you for that; I'll add the call to s6-l-i. -- Laurent