mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Make isvalidpid() know about pidfile the same as the other *pid functions do.(consistency)
This commit is contained in:
parent
b7ccf315a7
commit
0e604b3abc
@ -42,11 +42,10 @@ function killbypid($pidfile) {
|
||||
}
|
||||
|
||||
function isvalidpid($pid) {
|
||||
$running = `ps -p $pid | wc -l`;
|
||||
if(intval($running) > 1)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
$output = "";
|
||||
exec("/bin/pgrep -F {$pid}", $output, $retval);
|
||||
|
||||
return (intval($retval) == 0);
|
||||
}
|
||||
|
||||
function is_process_running($process) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user