From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/483 Path: main.gmane.org!not-for-mail From: Jim Zajkowski Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Who actually gets the TERM signal in "runsvctrl down"? Date: Fri, 25 Jun 2004 14:40:12 -0400 Message-ID: <17BAEA9A-C6D7-11D8-A5AC-000A95DA58FE@jimz.net> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1088188849 14210 80.91.224.253 (25 Jun 2004 18:40:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Jun 2004 18:40:49 +0000 (UTC) Original-X-From: supervision-return-721-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Jun 25 20:40:38 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 1Bdvcs-0002T4-00 for ; Fri, 25 Jun 2004 20:40:38 +0200 Original-Received: (qmail 13168 invoked by uid 76); 25 Jun 2004 18:40:59 -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 13162 invoked from network); 25 Jun 2004 18:40:59 -0000 In-Reply-To: Original-To: supervision@list.skarnet.org X-Pgp-Agent: GPGMail 1.0.1 (v33, 10.3) X-Mailer: Apple Mail (2.618) Xref: main.gmane.org gmane.comp.sysutils.supervision.general:483 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:483 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jun 25, 2004, at 12:03 PM, Lloyd Zusman wrote: > I don't want to send a TERM signal to httpd in order to stop it, > because > I want it to shut down using the same logic that "apachectl stop" uses, > which is definitely not to simply send a TERM signal to the httpd > daemon. From httpd (1.3.29) -h: -F: run main process in foreground, for process supervisors From the httpd manpage: To stop it, send a TERM signal to the initial (parent) process. httpd is designed to run directly under daemontools / runit using the - -F parameter to prevent it from detaching and running in the background. What that means: you don't need to, or really should, use apachectl. > #!/bin/sh > [...] > apachectl start Great: apachectl start returns while httpd runs in the background, which means daemontools / runit will run your script again, and again. You'll need to sleep endlessly. I run a bunch of webservers all using daemontools control of httpd directly. Works well and is highly reliable. It seems to me you are missing the fundamental technique that daemontools / runit is based around. This is like trying to use dd as a text editor. - --Jim - - - - Jim Zajkowski OpenPGP 0x21135C3 http://www.jimz.net/pgp.asc System Administrator 8A9E 1DDF 944D 83C3 AEAB 8F74 8697 A823 2113 5C53 UM Life Sciences Institute -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iD8DBQFA3HGMhpeoIyETXFMRAsyOAKCHh+JpN9k/yBf3tF8n77e/yyu11QCcDlvS G8YlRWBu17q0JJqjjGmEXLE= =T214 -----END PGP SIGNATURE-----