httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Q Beukes <apache-...@list.za.net>
Subject Apache Service Control
Date Sun, 08 Jul 2007 19:21:08 GMT
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

Mime
View raw message