pcs 98/10/06 08:36:04
Modified: src/main http_main.c Log: Avoid warning about PID file being overwritten on each start of Apache. This had two causes: first, if "-i", "-u" or "-S" was given (none of which start a daemon) the PID file was being updated with the new PID. Secondly, doing "net stop apache" or stopping Apache from the SCM did not remove the PID file because reporting a STOPPED status to the SCM seems to stop the process, so move the reporting of the STOPPED service to the very last thing we do. PR: 3053, 3084 Revision Changes Path 1.398 +2 -2 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.397 retrieving revision 1.398 diff -u -r1.397 -r1.398 --- http_main.c 1998/09/21 10:16:11 1.397 +++ http_main.c 1998/10/06 15:36:02 1.398 @@ -5579,7 +5579,6 @@ "forcing termination of child #%d (handle %d)", i, process_handles[i]); TerminateProcess((HANDLE) process_handles[i], 1); } - service_set_status(SERVICE_STOPPED); /* cleanup pid file on normal shutdown */ { @@ -5597,6 +5596,7 @@ } ap_destroy_mutex(start_mutex); + service_set_status(SERVICE_STOPPED); return (0); } @@ -5718,7 +5718,7 @@ exit(0); } - if (!child) { + if (!child && !ap_dump_settings && !install) { ap_log_pid(pconf, ap_pid_fname); } ap_set_version();