httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject RE: remove PID on shutdown
Date Thu, 23 Jul 1998 16:37:24 GMT
Most of the exits should be changed to clean_parent_exit().  Almost every
remaining one is during mutex or shared mem setup... so it should be
pretty easy to test that doing clean_parent_exit() there works. 

Dean

On Thu, 23 Jul 1998, Charles Randall wrote:

> There's so many exit() calls in http_main.c, I don't think that there's an
> easy
> and convenient place to put this.
> 
> Would adding an atexit() handler be sacrilege? To do this, we'd have to tuck
> away
> the pid of the controlling process and do something as simple as this in the
> handler:
> 
> 	if ( getpid() == ap_pid && ap_pid_fname != NULL) {
> 		unlink(ap_pid_fname);
> 	}
> 
> The problem with this is that the parent pid isn't stored anywhere, it is
> written to the pid file with a call to getpid() in ap_log_pid(). So, there
> appear to be two options. Share a global between http_main.c and http_log.c,
> or change ap_log_pid() to take the pid as an arg.
> 
> Charles
> 
> -----Original Message-----
> From: Marc Slemko [mailto:marcs@worldgate.com]
> Sent: Thursday, July 23, 1998 8:20 AM
> To: Foo Bar & Grill
> Subject: remove PID on shutdown
> 
> 
> (just a reminder to myself or anyone else who wants)
> 
> Apache should remove the pid file on shutdown.
> 


Mime
View raw message