From 3db00caa6b783bdb483fd1b454859c287de4c9c8 Mon Sep 17 00:00:00 2001 From: Jonathan Newton Date: Fri, 23 Jul 2021 07:03:26 +0000 Subject: [PATCH] Allow sending "squid -k ..." signals to PID 1 (#863) Inside a container, Squid usually runs with PID=1. Since "squid -k" feature was added in 1996 (commit 7690e8e), Squid refused to signal a PID=1 instance. We do not know why, and it could have been an accident. We cannot find a good reason to keep prohibiting such signalling. --- src/Instance.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Instance.cc b/src/Instance.cc index 2b95b77737..7ddbaf6367 100644 --- a/src/Instance.cc +++ b/src/Instance.cc @@ -81,7 +81,7 @@ GetOtherPid(File &pidFile) debugs(50, 7, "found PID " << rawPid << " in " << TheFile); - if (rawPid <= 1) + if (rawPid < 1) throw TexcHere(ToSBuf("Bad ", TheFile, " contains unreasonably small PID value: ", rawPid)); const auto finalPid = static_cast(rawPid); if (static_cast(finalPid) != rawPid) -- 2.47.3