Bug 11596 - Logrotate scripts do not kill processes properly
Summary: Logrotate scripts do not kill processes properly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apache
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-05-23 09:37 UTC by greatestjobs
Modified: 2007-04-18 16:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-07-31 13:17:38 UTC
Embargoed:


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

Description greatestjobs 2000-05-23 09:37:04 UTC
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 17:58:07 UTC
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 21:33:36 UTC
Created attachment 48428 [details]
force to use pkill -HUP httpd

Comment 3 Joe Orton 2003-07-31 13:17:38 UTC
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.