mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-09 00:00:53 -04:00
starter: Ignore an existing PID file if it references ourself
This commit is contained in:
parent
83187f3883
commit
3b29590b70
@ -276,7 +276,7 @@ static bool check_pid(char *pid_file)
|
|||||||
pid = atoi(buf);
|
pid = atoi(buf);
|
||||||
}
|
}
|
||||||
fclose(pidfile);
|
fclose(pidfile);
|
||||||
if (pid && kill(pid, 0) == 0)
|
if (pid && pid != getpid() && kill(pid, 0) == 0)
|
||||||
{ /* such a process is running */
|
{ /* such a process is running */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user