From: Jonathan Newton Date: Fri, 23 Jul 2021 07:03:26 +0000 (+0000) Subject: Allow sending "squid -k ..." signals to PID 1 (#863) X-Git-Tag: SQUID_6_0_1~308 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3db00caa6b783bdb483fd1b454859c287de4c9c8;p=thirdparty%2Fsquid.git 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. --- 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)