I am running httpd on a generated httpd.conf file. If the configuration is changed while httpd is running, and then loaded using if httpd -f /my/httpd.conf -t; then httpd -f /my/httpd.conf -k graceful || exit_with_error fi then the exit value of the graceful restart is 0, even though error_log says [Thu Sep 03 09:12:26 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Sep 03 09:12:26 2009] [warn] pid file /tomcat/httpd/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Thu Sep 03 09:12:26 2009] [notice] Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8k configured -- resuming normal operations [Thu Sep 03 09:12:43 2009] [notice] Graceful restart requested, doing restart (98)Address already in use: make_sock: could not bind to address xx.xx.xx.xx:80 no listening sockets available, shutting down Unable to open logs The suggested workaround to check the semantics ("start httpd as non-root") doesn't work in scripts, because this _always_ fails either due to bind, or due to the attempted access to reserved port 80/tcp, or it succeeds and keeps an unwanted httpd running with the wrong uid. I don't expect any miracles, but the exit value of "httpd -k graceful" _should_ show whether an httpd with the new configuration is running. Reliability is highly important for us. Silently dying Apaches is a _huge_ problem in our environment.
The httpd that's running at this point, to send the graceful restart signal, can't predict/inspect anything about the restarting httpd. A 0 exit code means the restart signal was sent, and checking/polling for the status of your httpd is beyond the scope of -k graceful.
I Understand, but the bug is that this procedure is not reliable IRL. Running an httpd I don't want to know whether the signaling mechanism worked, but whether Apache is still alive. I thought you would be interested in improving Apache? Can't you imagine that the restarting httpd and the running httpd perform some kind of IPC other than just a unidirectional signal? Please reconsider. Many thanx Harri
Marking as enhancement as the exit code is reasonable, patches welcome.
Looks like this was meant to be enhancement, not blocker.