From: Alan Knowles Date: Fri, 3 Feb 2012 04:09:54 +0000 (+0800) Subject: Notify.php X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=e2deefb7e4cf3abc33b7d06785aed759d04b452c;p=Pman.Core Notify.php --- diff --git a/Notify.php b/Notify.php index 789b5e00..76f017fc 100644 --- a/Notify.php +++ b/Notify.php @@ -218,12 +218,16 @@ class Pman_Core_Notify extends Pman foreach($this->pool as $p) { echo "CHECK PID: " . $p['pid'] . "\n"; + $info = proc_get_status($p['proc']); - if (file_exists('/proc/'.$p['pid'])) { + if ($info['running']) { + + //if (file_exists('/proc/'.$p['pid'])) { $pool[] = $p; continue; } echo "ENDED: " . $p['cmd'] . " : " . file_get_contents($p['out']) . "\n"; + proc_close($p['proc']) //unlink($p['out']); } echo "POOL SIZE: ". count($pool) ."\n";