From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1352 Path: news.gmane.org!not-for-mail From: Alex Efros Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: daemon under runit? Date: Wed, 6 Dec 2006 15:46:16 +0200 Organization: asdfGroup Inc., http://powerman.asdfGroup.com/ Message-ID: <20061206134616.GA17175@home.power> References: <20061205223442.10292.qmail@oak.oeko.net> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165412793 13083 80.91.229.10 (6 Dec 2006 13:46:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Dec 2006 13:46:33 +0000 (UTC) Original-X-From: supervision-return-1588-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Dec 06 14:46:30 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by dough.gmane.org with smtp (Exim 4.50) id 1Grx6J-0003nJ-BQ for gcsg-supervision@gmane.org; Wed, 06 Dec 2006 14:46:19 +0100 Original-Received: (qmail 4930 invoked by uid 76); 6 Dec 2006 13:46:40 -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 4924 invoked from network); 6 Dec 2006 13:46:39 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20061205223442.10292.qmail@oak.oeko.net> User-Agent: Mutt/1.5.13 (2006-08-11) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1352 Archived-At: Hi! On Tue, Dec 05, 2006 at 11:34:42PM +0100, Toni Mueller wrote: > I'm struggling with a program that, in many cases, forks to become a "in many cases"?! I.e. it fork sometimes and sometimes don't fork?! ;-) > daemon, that I'd like to run under runit (1.7.1). So far, I tried to > start the program in the run script, then wait in a 'finish' script for > it, and also have a control/t script to kill it if someone says > something like "sv down service". Unfortunately, in most cases, this > does not seem to work - the control/t script is not accessed when I > issue 'sv down service' (as "ls -lta" shows). One of the problems is You should use control/d instead of control/t if you wish to catch `sv down`. > that the file supervise/pid contains the pid of the finish script in > case the program forked, no longer the pid of the daemon itself. I > hoped to achieve something similar to fghack (from daemontools), but so > far failed. It's usually simple enough to patch any program to not fork. -- WBR, Alex.