Sun Oct 17 01:44:35 CEST 1999 Modified Files in squid/src main.c Delay removal of the pid file until shutdown has fully completed. This is to allow scripts to monitor the pid file when waiting for Squid to shut down. ----------------------------------------------------------------- Index: squid/src/main.c diff -u squid/src/main.c:1.1.1.32.2.1 squid/src/main.c:1.1.1.32.2.2 --- squid/src/main.c:1.1.1.32.2.1 Tue Jul 13 00:32:38 1999 +++ squid/src/main.c Sun Oct 17 01:44:35 1999 @@ -758,11 +758,6 @@ SquidShutdown(void *unused) { debug(1, 1) ("Shutting down...\n"); - if (Config.pidFilename && strcmp(Config.pidFilename, "none")) { - enter_suid(); - safeunlink(Config.pidFilename, 0); - leave_suid(); - } icpConnectionClose(); #if USE_HTCP htcpSocketClose(); @@ -822,5 +817,10 @@ debug(1, 1) ("Squid Cache (Version %s): Exiting normally.\n", version_string); fclose(debug_log); + if (Config.pidFilename && strcmp(Config.pidFilename, "none")) { + enter_suid(); + unlink(Config.pidFilename); + leave_suid(); + } exit(0); }