Received: (qmail 8883 invoked by uid 501); 31 Oct 2000 11:33:19 -0000 Message-Id: <20001031113319.8882.qmail@locus.apache.org> Date: 31 Oct 2000 11:33:19 -0000 From: Ralph Corderoy Reply-To: ralph@inputplus.demon.co.uk To: submit@bugz.apache.org Subject: Affect of HUP on Child Processes Not Documented. X-Send-Pr-Version: 3.110 >Number: 6767 >Category: documentation >Synopsis: Affect of HUP on Child Processes Not Documented. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: apache >Arrival-Date: Tue Oct 31 03:40:02 PST 2000 >Closed-Date: Tue Oct 31 11:30:29 PST 2000 >Last-Modified: Thu Nov 2 15:10:01 PST 2000 >Originator: ralph@inputplus.demon.co.uk >Release: N/A. >Organization: >Environment: Linux. >Description: Hi, Many Linux distributions seem to configure logrotate to rotate httpd's log files and issue a `killall -HUP `pidof httpd`' as a post-rotate command. The `Stopping and Starting' documentation says this causes the parent to kill all child processes, re-read its configuration, and re-open its log files. What effect does HUP-ing a child httpd have? Does it just ignore the signal? The documentation doesn't cover this. Ralph. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: fanf State-Changed-When: Tue Oct 31 11:30:26 PST 2000 State-Changed-Why: Apache forwards restart signals (HUP and USR1) to its process group, so doing a `killall -HUP httpd` is reasonably harmless. However, this is an unsupported implementation detail and therefore subject to change -- it's completely different in 2.0. You should not rely on it to work. If you want to rotate the logs of apache-1.3 the best way is to `kill -USR1` the parent process. From: Tony Finch To: apbugs@apache.org Cc: Ralph Corderoy Subject: Re: documentation/6767: Affect of HUP on Child Processes Not Documented. Date: Thu, 2 Nov 2000 18:36:58 +0000 Ralph Corderoy 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. -- en oeccget g mtcaa f.a.n.finch v spdlkishrhtewe y dot@dotat.at eatp o v eiti i d. fanf@covalent.net From: Ralph Corderoy To: Tony Finch Cc: apbugs@apache.org Subject: Re: documentation/6767: Affect of HUP on Child Processes Not Documented. Date: Thu, 02 Nov 2000 23:01:14 +0000 Hi Tony, > I suggest you file a bug with RedHat. Have done. Ralph. > From: bugzilla@redhat.com > Subject: [Bug 20256] New - logrotate sends a HUP to all Apache httpds. > To: ewt@redhat.com, ralph@inputplus.demon.co.uk, dlt@redhat.com > Date: Thu, 2 Nov 2000 17:57:45 -0500 > > http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=20256 > > --- shadow/20256 Thu Nov 2 17:57:45 2000 > +++ shadow/20256.tmp.19668 Thu Nov 2 17:57:45 2000 > @@ -0,0 +1,48 @@ > +Bug#: 20256 > +Product: Red Hat Linux > +Version: 6.1 > +Platform: i386 > +OS/Version: Linux > +Status: NEW > +Resolution: > +Severity: normal > +Priority: normal > +Component: logrotate > +AssignedTo: ewt@redhat.com > +ReportedBy: ralph@inputplus.demon.co.uk > +QAContact: dlt@redhat.com > +URL: > +Cc: ralph@inputplus.demon.co.uk > +Summary: logrotate sends a HUP to all Apache httpds. > + > +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 > +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 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. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]