]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
charon-tkm: Ignore an existing PID file if it references ourself
authorMartin Willi <martin@strongswan.org>
Mon, 12 Mar 2018 06:25:49 +0000 (07:25 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 21 Mar 2018 09:25:49 +0000 (10:25 +0100)
src/charon-tkm/src/charon-tkm.c

index 7f014237a40a476c2fe11f43aacb862f7ead2a45..181c6fb8a9eff51223b72d424ec3fc54e92b332e 100644 (file)
@@ -193,7 +193,7 @@ static bool check_pidfile()
                        }
                        fclose(pidfile);
                        pidfile = NULL;
-                       if (pid && kill(pid, 0) == 0)
+                       if (pid && pid != getpid() && kill(pid, 0) == 0)
                        {
                                DBG1(DBG_DMN, "%s already running ('%s' exists)", dmn_name,
                                         pidfile_name);