From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/487 Path: main.gmane.org!not-for-mail From: prj@po.cwru.edu (Paul Jarc) Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Who actually gets the TERM signal in "runsvctrl down"? Date: Fri, 25 Jun 2004 13:15:16 -0400 Organization: What did you have in mind? A short, blunt, human pyramid? Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088206271 17375 80.91.224.253 (25 Jun 2004 23:31:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Jun 2004 23:31:11 +0000 (UTC) Cc: supervision@list.skarnet.org, Charlie Brady Original-X-From: supervision-return-725-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Jun 26 01:31:00 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1Be09r-0004qY-00 for ; Sat, 26 Jun 2004 01:30:59 +0200 Original-Received: (qmail 15988 invoked by uid 76); 25 Jun 2004 23:31:18 -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 15983 invoked from network); 25 Jun 2004 23:31:18 -0000 Original-To: Lloyd Zusman In-Reply-To: (Lloyd Zusman's message of "Fri, 25 Jun 2004 12:36:50 -0400") Mail-Copies-To: nobody Mail-Followup-To: Lloyd Zusman , supervision@list.skarnet.org, Charlie Brady Original-Lines: 47 User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Xref: main.gmane.org gmane.comp.sysutils.supervision.general:487 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:487 Lloyd Zusman wrote: > Does passing "-k stop" to httpd cause it to signal itself with > TERM? It signals the other, already-running httpd. > If so, can we count on that in all versions of apache? If I were running Apache, I'd try to find a way to make my version work with daemontools. I wouldn't worry about older versions, since I wouldn't be running those. >> Why do you want this extra shell process between runsv and apache, and >> why do you want to run apachectl? > > Because I want to use the software's own recommended startup and > shutdown procedures when I invoke it and kill it. Right - you want a way that the authors/maintainers say should work. But you might ask them whether there is such a way other than apachectl, where you start a program that doesn't put itself into the background, and which responds to signals like SIGTERM. If they can give you such a way, that would be ideal. If not, then your script should be ok, except that I'd use "fghack apachectl start" to ensure that the script doesn't exit while Apache is running. (Don't use exec, since that would undo the shell's signal handler.) > It might be that in the specific case of apache, I can safely strip > out all of the wrapper stuff that its startup script (apachectl) > provides, but in the general case, I can't always count on this > working. Right - in the general case, we write replacements to make it work. :) > The amount of extra time that is used to start up and stop a > long-running daemon like apache by invoking its recommended wrapper > script inside of "run" is infinitessimal in relation to the daemon's > lifetime. The issue isn't the extra time, it's the inability to send signals reliably. ("httpd -k stop" almost certainly uses a pid file, which can be out of date.) paul