From 59c777d4ff85514b93307e463db232e578c326dd Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 25 Aug 2025 18:40:19 +0100 Subject: [PATCH] Fix the pid check on systems with reliable pid ordering (e.g. Docker). --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index f61174486..fa9d48ab7 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -241,7 +241,7 @@ static void write_pidfile() { pid_t oldpid = 0; oldstream >> oldpid; - if (oldpid && kill(oldpid, 0) == 0) + if (oldpid && oldpid != getpid() && kill(oldpid, 0) == 0) throw CoreException("Anope is already running with process id " + Anope::ToString(oldpid)); } oldstream.close();