Do not send signals from the master process to parent on shutdown. Revision 11330 has a nasty side-effect: When running in non-daemon mode, Squid sends SIGUSR1 signal to the parent process on shutdown. This results in shell (at least zsh) exit when Squid is interrupted with C-c. The patch adds a check to prevent the master process from killing it's parent on shut down. Same check added for the kill-parent hack. === modified file 'src/main.cc' --- src/main.cc 2011-03-30 19:39:14 +0000 +++ src/main.cc 2011-03-30 19:59:19 +0000 @@ -600,51 +600,51 @@ reconfigure(int sig) signal(sig, reconfigure); #endif #endif } void shut_down(int sig) { do_shutdown = sig == SIGINT ? -1 : 1; ShutdownSignal = sig; #ifdef SIGTTIN if (SIGTTIN == sig) shutdown_status = 1; #endif const pid_t ppid = getppid(); - if (ppid > 1) { + if (!IamMasterProcess() && ppid > 1) { // notify master that we are shutting down if (kill(ppid, SIGUSR1) < 0) debugs(1, DBG_IMPORTANT, "Failed to send SIGUSR1 to master process," " pid " << ppid << ": " << xstrerror()); } #ifndef _SQUID_MSWIN_ #if KILL_PARENT_OPT - if (ppid > 1) { + if (!IamMasterProcess() && ppid > 1) { debugs(1, DBG_IMPORTANT, "Killing master process, pid " << ppid); if (kill(ppid, sig) < 0) debugs(1, DBG_IMPORTANT, "kill " << ppid << ": " << xstrerror()); } #endif /* KILL_PARENT_OPT */ #if SA_RESETHAND == 0 signal(SIGTERM, SIG_DFL); signal(SIGINT, SIG_DFL); #endif #endif } static void serverConnectionsOpen(void) { if (IamPrimaryProcess()) {