Notify.php
[Pman.Core] / Notify.php
index 7e4f65e..a819c6a 100644 (file)
@@ -86,7 +86,7 @@ class Pman_Core_Notify extends Pman
         ),
     );
     
-    
+    var $nice_level = false;
     var $max_pool_size = 10;
     
     var $table = 'core_notify';
@@ -265,7 +265,7 @@ class Pman_Core_Notify extends Pman
     function run($id, $email, $cmdOpts="")
     {
         
-        static $renice = fase;
+        static $renice = false;
         if (!$renice) {
             require_once 'System.php';
             $renice = System::which('renice');
@@ -309,6 +309,11 @@ class Pman_Core_Notify extends Pman
         
         $p = proc_open($cmd, $descriptorspec, $pipes, $cwd );
         $info =  proc_get_status($p);
+        
+        if ($this->nice_level !== false) { 
+            $rcmd = "$renice {$this->nice_level} {$info['pid']}";
+            `$rcmd`;
+        } 
         $this->pool[] = array(
                 'proc' => $p,
                 'pid' => $info['pid'],