From: Martin Willi Date: Mon, 12 Mar 2018 06:25:49 +0000 (+0100) Subject: charon-tkm: Ignore an existing PID file if it references ourself X-Git-Tag: 5.6.3dr1~19 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=83187f3883515770e4255c29682917724f9cf622;p=thirdparty%2Fstrongswan.git charon-tkm: Ignore an existing PID file if it references ourself --- diff --git a/src/charon-tkm/src/charon-tkm.c b/src/charon-tkm/src/charon-tkm.c index 7f014237a4..181c6fb8a9 100644 --- a/src/charon-tkm/src/charon-tkm.c +++ b/src/charon-tkm/src/charon-tkm.c @@ -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);