On Sat, 02 Feb 2019 09:07:31 +0000
"Laurent Bercot" <ska-supervision_at_skarnet.org> wrote:
> >I think a cool addition to runit program sv and s6's s6-svc would be
> >a command to send an arbitrary signal to the daemon being
> >supervised.
>
> Yes, that would be a nice feature. I've been thinking about it for
> some time.
> Unfortunately, that's not at all suited to the way the control
> program communicates with the supervisor, and adding this feature,
> as simple as it seems, would require significant work.
>
> There is probably a (dirty, hackish) way to make it work with
> normal signals (<128). But there's absolutely no way to ever make it
> work with real-time signals or anything with a signal number over 128
> without rewriting the supervisor state machine and making it more
> complex and more brittle. Which is an instant nope from me.
Yes. If I liked complex and brittle, I'd just use systemd.
I wasn't aware there were interrupts higher than 128. When I perform
kill -L on my machine, the biggest number is 64.
>
> Restricting the feature to normal signals would probably be enough,
> but even then, I'm not comfortable with the level of hackiness it
> would require.
No problem, watch this (done in runit because I have no running s6 right
now):
====================================================
kill -s SIGKILL `sv status agetty-tty6 | \
sed -e"s/.*(pid\s*//" -e"s/).*//"
====================================================
So I can already get what I was asking for. What would make life a
little more convenient would be if sv had a "pid" command that would be
just like the "status" command except it prints only the PID. Then the
preceding command simplifies to:
====================================================
kill -s SIGKILL `sv pid agetty-tty6`
====================================================
I don't know if the s6-svc command already has the equivalent of a
hypothetical sv "pid" command, but if it doesn't, I imagine it would be
easy to put in and very helpful to those forging shellscripts.
By adding this little addition to s6-svc (and hopefully sv if Gerrit
can scrape together the time), no hackiness would be added to s6 or
runit: Any hackiness would be in the shellscript created by the
programmer using s6 or runit.
SteveT
--
Steve Litt
January 2019 featured book: Troubleshooting: Just the Facts
http://www.troubleshooters.com/tjust
Received on Sat Feb 02 2019 - 19:30:14 UTC