From 3b29590b705f31abe594fc1496f0a4be7e1f823c Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 12 Mar 2018 07:26:06 +0100 Subject: [PATCH] starter: Ignore an existing PID file if it references ourself --- src/starter/starter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/starter/starter.c b/src/starter/starter.c index 51a42a504..6c0739340 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -276,7 +276,7 @@ static bool check_pid(char *pid_file) pid = atoi(buf); } fclose(pidfile); - if (pid && kill(pid, 0) == 0) + if (pid && pid != getpid() && kill(pid, 0) == 0) { /* such a process is running */ return TRUE; }