httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Randall <crand...@matchlogic.com>
Subject RE: remove PID on shutdown
Date Thu, 23 Jul 1998 15:16:04 GMT
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