charon-tkm: Ignore an existing PID file if it references ourself

This commit is contained in:
Martin Willi
2018-03-21 10:25:49 +01:00
committed by Tobias Brunner
parent 9655a3ffbc
commit 83187f3883
+1 -1
View 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);