Notify.php
authorAlan Knowles <alan@akbkhome.com>
Wed, 6 Apr 2011 08:33:34 +0000 (16:33 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 6 Apr 2011 08:33:34 +0000 (16:33 +0800)
Notify.php

index 0e1029b..0552b93 100644 (file)
@@ -65,9 +65,18 @@ class Pman_Core_Notify extends Pman
     }
     
     function poolfree() {
-        foreach($this->pool as $p)
-        
-        
+        $pool = array();
+        foreach($this->pool as $p) {
+            $ar = proc_get_Status($p);
+            if (!$p['running']) {
+                $pool[] = $p;
+            }
+        }
+        $this->pool = $pool;
+        if (count($pool) < 10) {
+            return true;
+        }
+        return false;
         
     }