From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2491 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Steve Litt Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Generic interrupt command? Date: Sat, 2 Feb 2019 14:30:14 -0500 Message-ID: <20190202143014.77a5ac5f@mydesk.domain.cxm> References: <20190201213620.68abc837@mydesk.domain.cxm> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="260657"; mail-complaints-to="usenet@blaine.gmane.org" To: supervision@list.skarnet.org Original-X-From: supervision-return-2081-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Feb 02 20:30:19 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 1gq0za-0015fn-L6 for gcsg-supervision@m.gmane.org; Sat, 02 Feb 2019 20:30:18 +0100 Original-Received: (qmail 2475 invoked by uid 89); 2 Feb 2019 19:30:44 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 2468 invoked from network); 2 Feb 2019 19:30:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; h=X-Originating-IP:Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:MIME-Version:Content-Type:Content-Transfer-Encoding; s=default; d=troubleshooters.com; b=QpXWKpJI4mrZflNHjvL6+Pbi5LahYhkdELuiJfn136Iy0adVMJvso4NMEpkIgspp09OYhqq3ToG1IgTj1ePydN2sn3YINXBrz/iyewe/UMK5TrAKVbSTzObBEkdSG6e0jZpX9sMD+2cAWaxgK2ES3b+PebNi06vJ3kJqlR75LaI=; DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=troubleshooters.com; s=default; t=1549135816; bh=8oQ3Ym+/MU0tAskbxiAEZg5XBOc=; l=2468; h=X-Originating-IP:Date:From:To:Subject:Message-ID:In-Reply-To: References:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; b=n0ccWMapg3+QmCQHQDUx1hNNjaPBIv0hgvBkQdxfEfC2NFt/093e55MKi+vbC22M/ k6Gj0q+39tPD2t7rrU/8k8S6/4ptCpXRF8pauehSk115haKzcJUS0E1mnpi9HvtFV/ xA80m2XjuGX8BBWqrnYdx4rGAsoG6vhJb580c38E= X-Originating-IP: [72.188.224.222] In-Reply-To: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2491 Archived-At: On Sat, 02 Feb 2019 09:07:31 +0000 "Laurent Bercot" 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