]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not check pid file unless we are a master process. Kids processes start and
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 26 Apr 2010 20:57:11 +0000 (14:57 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 26 Apr 2010 20:57:11 +0000 (14:57 -0600)
run when the pid file may point to a live Squid process.

There are some must-be-single processes like Coordinator, but it is probably
better to manage their uniqueness differently because there may be many kinds
of must-be-single processes.

src/main.cc

index 0a8cdece3286504ce032fe8891b31dbbcfa52aa9..2815a5c31b2acc05be058c78724de8ce3ddc7c4c 100644 (file)
@@ -1540,6 +1540,10 @@ mainStartScript(const char *prog)
 static int
 checkRunningPid(void)
 {
+    // master process must start alone, but its kids processes may co-exist
+    if (KidIdentifier != 0)
+        return 0;
+
     pid_t pid;
 
     if (!debug_log)