Re: runit SIGPWR support

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Mon, 24 Feb 2020 22:25:50 +0000

  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
Received on Mon Feb 24 2020 - 22:25:50 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC