+ //if (file_exists('/proc/'.$p['pid'])) {
+ $runtime = time() - $p['started'];
+ //echo "RUNTIME ({$p['pid']}): $runtime\n";
+ if ($runtime > $maxruntime) {
+
+ proc_terminate($p['proc'], 9);
+ //fclose($p['pipes'][1]);
+ fclose($p['pipes'][0]);
+ fclose($p['pipes'][2]);
+ echo "\nTERMINATING: ({$p['pid']}) " . $p['cmd'] . " : " . file_get_contents($p['out']) . "\n";
+ @unlink($p['out']);
+
+ continue;
+ }
+