Bug 20256 - logrotate sends a HUP to all Apache httpds.
logrotate sends a HUP to all Apache httpds.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: logrotate (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-02 17:54 EST by Ralph Corderoy
Modified: 2007-04-18 12:29 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-02 17:54:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ralph Corderoy 2000-11-02 17:54:54 EST
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@apache.org>
Subject: Re: documentation/6767: Affect of HUP on Child Processes Not
Documented.
To:      apbugs@apache.org
Date:    Thu, 2 Nov 2000 18:36:58 +0000

Ralph Corderoy <ralph@inputplus.demon.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 05:55:31 EST
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.