Bug 11596 - Logrotate scripts do not kill processes properly
Logrotate scripts do not kill processes properly
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: apache (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-23 05:37 EDT by greatestjobs
Modified: 2007-04-18 12:27 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-31 09:17:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
force to use pkill -HUP httpd (187 bytes, text/plain)
2002-03-13 16:33 EST, Arturo Saucedo
no flags Details

  None (edit)
Description greatestjobs 2000-05-23 05:37:04 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:

	/etc/rc.d/init.d/httpsd stop
        sleep 1
        /etc/rc.d/init.d/httpsd start

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.

Regards,

Dr. Dre
Comment 1 Nalin Dahyabhai 2000-06-16 13:58:07 EDT
This might well have been an Apache bug.  Do you see this same
behavior using the newer packages included with 6.2
(ftp://ftp.redhat.com/redhat/redhat-6.2/i386/)?
Comment 2 Arturo Saucedo 2002-03-13 16:33:36 EST
Created attachment 48428 [details]
force to use pkill -HUP httpd
Comment 3 Joe Orton 2003-07-31 09:17:38 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.