From: Steve Litt <slitt@troubleshooters.com>
To: supervision@list.skarnet.org
Subject: Re: Generic interrupt command?
Date: Sat, 2 Feb 2019 14:30:14 -0500 [thread overview]
Message-ID: <20190202143014.77a5ac5f@mydesk.domain.cxm> (raw)
In-Reply-To: <em454e625c-2515-4dc6-9d01-fcd67999d51d@elzian>
On Sat, 02 Feb 2019 09:07:31 +0000
"Laurent Bercot" <ska-supervision@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
next prev parent reply other threads:[~2019-02-02 19:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 2:36 Steve Litt
2019-02-02 9:07 ` Laurent Bercot
2019-02-02 19:30 ` Steve Litt [this message]
2019-02-02 21:08 ` Colin Booth
2019-02-02 21:40 ` Steve Litt
2019-02-05 3:09 ` John O'Meara
2019-02-05 4:15 ` Roger Pate
2019-02-05 7:20 ` Laurent Bercot
2019-02-05 14:16 ` John O'Meara
2019-02-05 19:30 ` Laurent Bercot
2019-02-10 4:14 ` John O'Meara
2019-02-10 11:41 ` Laurent Bercot
2019-02-02 22:31 ` Jonathan de Boyne Pollard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190202143014.77a5ac5f@mydesk.domain.cxm \
--to=slitt@troubleshooters.com \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).