pcs 98/09/21 03:16:12
Modified: src/main http_main.c
Log:
Remove PID file on windows as well as Unix
Revision Changes Path
1.397 +11 -0 apache-1.3/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
retrieving revision 1.396
retrieving revision 1.397
diff -u -r1.396 -r1.397
--- http_main.c 1998/09/20 10:53:53 1.396
+++ http_main.c 1998/09/21 10:16:11 1.397
@@ -5581,6 +5581,17 @@
}
service_set_status(SERVICE_STOPPED);
+ /* cleanup pid file on normal shutdown */
+ {
+ const char *pidfile = NULL;
+ pidfile = ap_server_root_relative (pparent, ap_pid_fname);
+ if ( pidfile != NULL && unlink(pidfile) == 0)
+ ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO,
+ server_conf,
+ "httpd: removed PID file %s (pid=%ld)",
+ pidfile, (long)getpid());
+ }
+
if (pparent) {
ap_destroy_pool(pparent);
}