Trunk r11330 introduced a bug: 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
shutdown.
Same check added for the kill-parent hack.
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,"
#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)