From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1384 Path: news.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: How to kill runsv, no matter what? Date: Fri, 23 Feb 2007 12:59:28 -0500 Organization: What did you have in mind? A short, blunt, human pyramid? Message-ID: References: <5422d5e60702211214q7ecaf23co838e9ff1b9be32de@mail.gmail.com> <5422d5e60702211304g5051747aoad3dd893abaf0b16@mail.gmail.com> <5422d5e60702221951h1abb7e60l77717192900a63a8@mail.gmail.com> <20070223140504.17459.qmail@3f646761ee1f68.315fe32.mid.smarden.org> <5422d5e60702230932q609f8ea8n76a3856c8b6cb3cc@mail.gmail.com> <5422d5e60702230946w2a69034exa0848c8c5163a7ad@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1172253583 22991 80.91.229.12 (23 Feb 2007 17:59:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Feb 2007 17:59:43 +0000 (UTC) Cc: supervision@list.skarnet.org To: "Daniel Clark" Original-X-From: supervision-return-1620-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Feb 23 18:59:32 2007 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1HKehg-0001LN-Lx for gcsg-supervision@gmane.org; Fri, 23 Feb 2007 18:59:32 +0100 Original-Received: (qmail 18602 invoked by uid 76); 23 Feb 2007 17:59:54 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 18597 invoked from network); 23 Feb 2007 17:59:54 -0000 In-Reply-To: <5422d5e60702230946w2a69034exa0848c8c5163a7ad@mail.gmail.com> (Daniel Clark's message of "Fri, 23 Feb 2007 12:46:42 -0500") Mail-Copies-To: nobody Mail-Followup-To: "Daniel Clark" , supervision@list.skarnet.org Original-Lines: 33 User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) X-Junkmail-Status: score=10/49, host=mpv4.tis.cwru.edu X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A09020B.45DF2B83.00AF,ss=1,fgs=0, ip=129.22.105.36, so=2006-09-22 03:48:54, dmn=5.2.125/2007-01-26 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1384 Archived-At: "Daniel Clark" wrote: > the original daemontools seems to work with services with this "bug" Yes, but only because it makes no attempt to ensure that log data is written before the logger is shut down. > and both daemontools and (I think) runit have a suite of tools to > hack around issues with services that aren't designed to work with > the supervision model of service control (e.g. the thing that forces > processes to stay in the foreground). That's true, but those are just the easy workarounds, and they're imperfect. (E.g., they don't relay signals.) Reliably handling log data and simultaneously working around services that leave stray child processes is a hard problem, and the easiest solution known so far is to fix each individual service. > Actually, perhaps that would be the best way to deal with this - some > small binary that can be used instead of exec in "run" scripts that > has the property of killing all of its child processes when it dies - > would something like that be feasible? That could work for some cases (but, like pgrphack et al., it would be sandwiched between exec and the real service, not used in place of exec). It would have to initially put itself in its own process group, relay SIGTERM to every process in that process group, and relay other signals to its immediate child. But this won't help if the service or its children put themselves in their own process group. Also, SIGKILL and SIGSTOP can't be relayed, so you lose functionality there too. So fixing the service still remains an attractive option. paul