Bug 20256 - logrotate sends a HUP to all Apache httpds.
Summary: logrotate sends a HUP to all Apache httpds.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logrotate
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Erik Troan
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-02 22:54 UTC by Ralph Corderoy
Modified: 2007-04-18 16:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-11-02 22:54:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Ralph Corderoy 2000-11-02 22:54:54 UTC
Hi,

Having entered into discussion with the Apache folks it turns out that they
clearly state that signals should only be sent to the parent process,
not all the child servers.  logrotate sends a HUP to all httpds that
are running;  this is wrong and gives undefined behaviour.

From:    Tony Finch <fanf>
Subject: Re: documentation/6767: Affect of HUP on Child Processes Not
Documented.
To:      apbugs
Date:    Thu, 2 Nov 2000 18:36:58 +0000

Ralph Corderoy <ralph.co.uk> wrote:
>
>Thanks for the prompt reply.
>
>Perhaps a warning that the current behaviour is unsupported
>implementation detail would stop Linux distributors, like Red Hat, from
>using `killall -HUP httpd' in their logrotate configuration.

We do: see http://www.apache.org/docs/stopping.html which says:

:You will notice many httpd executables running on your system, but you
:should not send signals to any of them except the parent, whose pid is
:in the PidFile. That is to say you shouldn't ever need to send signals
:to any process except the parent.

I suggest you file a bug with RedHat.

Tony.

Comment 1 Pekka Savola 2000-11-04 10:55:31 UTC
This has been fixed in RHL 7.0:

/var/log/httpd/access_log {
    missingok
    postrotate
        /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

However, the signal should be USR1 not HUP.  That's another issue though.



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