mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Make is_pid_running function return more conisten results by using isvalidpid
This commit is contained in:
parent
192d89317a
commit
d3647381b0
@ -174,9 +174,7 @@ function restart_service($name) {
|
||||
function is_pid_running($pidfile) {
|
||||
if (!file_exists($pidfile))
|
||||
return false;
|
||||
$running = shell_exec("/bin/pgrep -F {$pidfile} 2>/dev/null");
|
||||
|
||||
return (!empty($running));
|
||||
return isvalidpid($pidfile);
|
||||
}
|
||||
|
||||
function is_dhcp_running($interface) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user