From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/478 Path: main.gmane.org!not-for-mail From: Dean Hall Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Who actually gets the TERM signal in "runsvctrl down"? Date: Fri, 25 Jun 2004 11:13:19 -0500 Message-ID: <40DC4F1F.1080604@deanpence.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1088179916 20504 80.91.224.253 (25 Jun 2004 16:11:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Jun 2004 16:11:56 +0000 (UTC) Original-X-From: supervision-return-716-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Jun 25 18:11:41 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 1BdtIj-0005KP-00 for ; Fri, 25 Jun 2004 18:11:41 +0200 Original-Received: (qmail 11998 invoked by uid 76); 25 Jun 2004 16:12:02 -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 11992 invoked from network); 25 Jun 2004 16:12:02 -0000 User-Agent: Mozilla Thunderbird 0.5 (X11/20040229) X-Accept-Language: en-us, en Original-To: supervision@list.skarnet.org In-Reply-To: X-Enigmail-Version: 0.83.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Xref: main.gmane.org gmane.comp.sysutils.supervision.general:478 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:478 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Charlie, Just some notes and questions for my own edification, somewhat unrelated to the original post. Charlie Brady wrote: | The better way is runit/daemontools. runsvctrl is just a shell script | which tries to do what runsv is already able to do reliably. It delivers a | signal to the session leading httpd process, which it has hopefully found | by way of a pid file. That process then "does the right thing" with its | children. I'm not sure what you mean when you say that runsvctrl does what runsv already does. As I understand it, it's the Right Thing To Do to send signals to your service process (or in the case of "u", "d" and "x", to runsv itself). (Also, runsvctrl doesn't appear to be a shell script, at least not in runit-1.0.2.) | For "apachectl stop", just do "runsvctrl down apache". For "apachectl | graceful", do "runsvctrl 1 apache; raunsvctrl u apache". For "apachectrl | restart", do "runsvctrl t apache; raunsvctrl u apache". Etc. Why are you doing the additional "u"? As I understand it, sending a "u" to the fifo is really necessary if the service is marked as down. If after sending any signal to the process it dies/crashes, runsv should restart it automatically. Does runsv not always do this? (I've never had any trouble.) If not, sounds like a major bug, as that's what it's supposed to do. So when I restart apache, I just do: runsvctrl t /service/httpd BTW, I recommend running apache2 with pgrphack so it won't kill other things when you kill it. Apache 1.3 doesn't seem to have this problem. I know it has something to do with being the session leader (a la sid()), but I'm not a Linux systems programmer (nor really a C programmer) and am not sure what all that entails. Dean -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFA3E8fBnn70KGO4CURAuiZAJ400njbPJycCOLp2lNVnJhte5eMyQCggO7u GZuZ/z8VC1nYlcarfnrZQzA= =QqIc -----END PGP SIGNATURE-----