Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 88519 invoked from network); 8 Jul 2007 19:20:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jul 2007 19:20:16 -0000 Received: (qmail 80894 invoked by uid 500); 8 Jul 2007 19:20:11 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 80831 invoked by uid 500); 8 Jul 2007 19:20:11 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 80820 invoked by uid 99); 8 Jul 2007 19:20:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jul 2007 12:20:11 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [72.29.81.59] (HELO skywalk.co.za) (72.29.81.59) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jul 2007 12:20:08 -0700 Received: from dsl-240-238-75.telkomadsl.co.za ([41.240.238.75] helo=[10.0.1.238]) by skywalk.co.za with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.62) (envelope-from ) id 1I7c8g-0006G8-If for dev@httpd.apache.org; Sun, 08 Jul 2007 15:09:47 -0400 Message-ID: <46913924.2040604@list.za.net> Date: Sun, 08 Jul 2007 21:21:08 +0200 From: Q Beukes User-Agent: Thunderbird 1.5.0.7 (X11/20061023) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Apache Service Control Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hey, I have a question about the design of the service control of Apache in a Unix environment. Why is it controlled with signals? When you try and stop Apache a TERM signal is sent and the process returns. Then the service starts shutting down. (I bet I just teached you guys something, huh ;>). To restart the process you need to send a HUP signal. This works fine, but what if you want to stop the server for a moment and then start it again, perhaps doing something in the mean while. This cannot be automated unless you watch the process/PID in some way. This is fine for most purposes, but what if you want to stop what you're doing in case the shutdown fails. If the "httpd" binary would return a non-negative exit code you could know for sure that a failure occured. A timeout is not so definite. You can send the TERM signal and wait X amount of seconds, and if the process is still active you stop, but what if it then finally exits after that? These are just some issues people have. Some people feel it's a bad design. Some people (like me) are not so sure what the idea behind it is. Especially since it's been around since forever - does it have a good reason for being there and not having changed? I mean Apache has a pretty good design in general - why would this be any different? If someone could shed some light on this it would surely ease whats been bugging me for quite a while. Thanks, Q Beukes