From: Alan Knowles Date: Sun, 10 Apr 2011 07:44:56 +0000 (+0800) Subject: Notify.php X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=9e9c1c168ee8439a97bf171137e57b131c212e09;p=Pman.Core Notify.php --- diff --git a/Notify.php b/Notify.php index 3b5f515c..6eb73cd0 100644 --- a/Notify.php +++ b/Notify.php @@ -79,17 +79,19 @@ class Pman_Core_Notify extends Pman echo $cmd . "\n"; $pipe = array(); $p = proc_open($cmd, $descriptorspec, $pipes, $cwd ); - $this->pool[] = array('proc' => $p, 'pipes' =>$pipes); + $this->pool[] = array('proc' => $p, 'pipes' =>$pipes, 'cmd' => $cmd); } function poolfree() { $pool = array(); foreach($this->pool as $p) { - $ar = proc_get_Status($p['proc']); + $ar = proc_get_status($p['proc']); //var_dump($ar); if ($ar['running']) { $pool[] = $p; + continue; } + echo $p['cmd'] . " : " . stream_get_contents($p['pipes'][1]); } $this->pool = $pool; if (count($pool) < 10) {