Notify.php
authorAlan Knowles <alan@akbkhome.com>
Fri, 3 Feb 2012 04:11:49 +0000 (12:11 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 3 Feb 2012 04:11:49 +0000 (12:11 +0800)
Notify.php

index 0814548..6fd40e1 100644 (file)
@@ -207,7 +207,10 @@ class Pman_Core_Notify extends Pman
                 'pid' => $info['pid'],
                 'out' => $tn,
                 'cmd' => $cmd,
-                'email' => $email
+                'email' => $email,
+                'pipes' => $pipes
+            
+                
         );
     }
     
@@ -226,7 +229,12 @@ class Pman_Core_Notify extends Pman
                 $pool[] = $p;
                 continue;
             }
+            
+            fclose($p['pipes'][1]);
+            fclose($p['pipes'][0]);
+            fclose($p['pipes'][2]);
             proc_close($p['proc']);
+            
             echo "ENDED: " . $p['cmd'] . " : " . file_get_contents($p['out']) . "\n";