]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix shutdown aborts after rev.14374
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 1 Nov 2015 10:07:41 +0000 (02:07 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 1 Nov 2015 10:07:41 +0000 (02:07 -0800)
Changes to signal processing introduced by rev.14374 causse Squid to
ignore repeated signals.

However, repeated shutdown signals actually has meaning and need to abort
the shutdown delay timeout. So we need to allow those through to the
shutdown signal handler.

src/main.cc

index 7447889754971927bce0b30932c62bdefead63dc..5470024097a8ad6445de2ed3c1942845cfbc9b22 100644 (file)
@@ -259,6 +259,10 @@ AvoidSignalAction(const char *description, volatile int &signalVar)
     if (shutting_down) {
         currentEvent = "shutdown";
         avoiding = "canceling";
+        // do not avoid repeated shutdown signals
+        // which just means the user wants to skip/abort shutdown timeouts
+        if (strcmp(currentEvent, description) == 0)
+            return false;
         signalVar = 0;
     }
     else if (!configured_once)