Notify.php
authorAlan Knowles <alan@akkbhome.com>
Sun, 10 Apr 2011 07:41:56 +0000 (15:41 +0800)
committerAlan Knowles <alan@akkbhome.com>
Sun, 10 Apr 2011 07:41:56 +0000 (15:41 +0800)
Notify.php

index 8b3d59b..3b5f515 100644 (file)
@@ -79,15 +79,15 @@ class Pman_Core_Notify extends Pman
         echo $cmd . "\n";
         $pipe = array();
         $p = proc_open($cmd, $descriptorspec, $pipes, $cwd );
-        $this->pool[] = $p;
+        $this->pool[] = array('proc' => $p, 'pipes' =>$pipes);
     }
     
     function poolfree() {
         $pool = array();
         foreach($this->pool as $p) {
-            $ar = proc_get_Status($p);
+            $ar = proc_get_Status($p['proc']);
             //var_dump($ar);
-            if ($p['running']) {
+            if ($ar['running']) {
                 $pool[] = $p;
             }
         }