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

index c6eb065..5fd5e9e 100644 (file)
@@ -231,13 +231,19 @@ class Pman_Core_Notify extends Pman
                 continue;
             }
             
+            echo "CLOSING: " . $p['cmd'] . " : " . file_get_contents($p['out']) . "\n";
             //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";
             
+            clearstatcache();
+            if (file_exists('/proc/'.$p['pid'])) {
+                $pool[] = $p;
+                continue;
+            }
+            echo "ENDED: " . $p['cmd'] . " : " . file_get_contents($p['out']) . "\n";
             
             //unlink($p['out']);
         }