The following reply was made to PR os-unixware/1082; it has been noted by GNATS.

From: Dean Gaudet <[EMAIL PROTECTED]>
To: David Alan Pisoni <[EMAIL PROTECTED]>
Subject: Re: os-unixware/1082: SIGHUP causes web server to quit instead of 
restart
Date: Mon, 8 Sep 1997 17:33:30 -0700 (PDT)

 
 
 
 On Mon, 8 Sep 1997, David Alan Pisoni wrote:
 
 > Okay, that nailed it.  Should I but the IFDEF's back, or did both changes 
 > make the fix?
 
 You can put the ifdefs back probably ... the NO_SLACK thing probably fixes
 the problem alone.  But we should try to find a better solution.  NO_SLACK
 disables a useful feature for large webservers (lots of log files). 
 
 > Also a question... on the issue of log cycling.  Is there any reason why 
 > this sequence shouldn't work?  The following code is perl (hoping you know 
 > perl!), and the variable $filename refers to a log file name.  This code is 
 > re run with every log file t he web server creates.  Under some conditions, 
 > I found (in earlier versions) that too many HUP's too close together caused 
 > the server parent to die, but left many children alive (they would continue 
 > live for awhile.  I had to individually TERM them, then  re-open the server, 
 > because they had control of the HTTP port.  This problem went away when I 
 > put the 'sleep 5;' line in.)
 
 This bug should be fixed in 1.2.4 as well -- HUPs and such in quick
 succession that is.
 
 > hmm.. linewraps make it real ugly... I'll just explain the logic.
 > 
 > rename older files (i.e., $filename.0.gz becomes $filename.1.gz)
 > remove oldest file
 > if not access_log :
 >      rename $filename $filename.0
 
 I'm confused ... should access_log be $filename?  I'm still confused.  Oh
 I think I understand you're special casing the access_log.  This should be
 a fine method of rotating logs, assuming signal 1 is SIGHUP on your box. 
 
 Dean
 
 >      touch $filename
 >      kill 1, $HTTPD_PID
 >      sleep 5
 > if access log
 >      rename $filename $filename.tmp
 >      touch $filename
 >      kill 1, $HTTPD_PID
 >      sleep 5
 >      logresolve < $filename.tmp > $filename.0
 > gzip $filename.0
 > 
 > This logic looks okay to me, and I've been using it for over a year.  Do you 
 > see any reason why it would cause Apache for SVR4 to not open the log file?  
 > Or do you think it was all the SLACK/descriptor problem?
 > 
 > Thanks,
 > 
 > David
 > 
 > 
 > 
 > 
 

Reply via email to