Red Hat Bugzilla – Bug 11596
Logrotate scripts do not kill processes properly
Last modified: 2007-04-18 12:27:05 EDT
The default logrotate scripts (in part. /etc/logrotate.d/apache) do not
function properly. The post-rotate script either does a:
/usr/bin/killall -HUP httpd
in RH 6.0 or a
/usr/bin/killall -USR1 httpd
in RH 6.1.
Presumably these commands should cause apache to close and re-open its log
files. Unfortunately, at least in the case of RH 6.1, it kills apache.
My view is the post-rotate scripts should function like:
That way any customizations the user has made in the scripts which are
designed to stop and start apache are executed.
In any event, the 'USR1' signal is RH 6.1 should be changed to something
that doesn't kill apache.
This might well have been an Apache bug. Do you see this same
behavior using the newer packages included with 6.2
Created attachment 48428 [details]
force to use pkill -HUP httpd
The logrotate script has done:
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
for a long while now.