Make isvalidpid() know about pidfile the same as the other *pid functions do.(consistency)

This commit is contained in:
Ermal 2010-10-29 14:08:48 +00:00
parent b7ccf315a7
commit 0e604b3abc

View File

@ -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) {