File inc/util.inc.php changed (mode: 100644) (index da2309d..cc1060f) |
... |
... |
function rg_exec2($a) |
1412 |
1412 |
rg_exec2_helper_init($info); |
rg_exec2_helper_init($info); |
1413 |
1413 |
} |
} |
1414 |
1414 |
|
|
|
1415 |
|
$terminating = FALSE; |
1415 |
1416 |
while (1) { |
while (1) { |
1416 |
1417 |
// check if all commands are started |
// check if all commands are started |
1417 |
1418 |
$now = time(); |
$now = time(); |
|
... |
... |
function rg_exec2($a) |
1455 |
1456 |
. print_r($info['ps'], TRUE)); |
. print_r($info['ps'], TRUE)); |
1456 |
1457 |
|
|
1457 |
1458 |
if ($info['ps']['running'] !== FALSE) { |
if ($info['ps']['running'] !== FALSE) { |
1458 |
|
$done = FALSE; |
|
1459 |
|
continue; |
|
|
1459 |
|
if ($terminating) { |
|
1460 |
|
$info['ps']['exitcode'] = @proc_close($info['a']); |
|
1461 |
|
} else { |
|
1462 |
|
$done = FALSE; |
|
1463 |
|
continue; |
|
1464 |
|
} |
1460 |
1465 |
} |
} |
1461 |
1466 |
|
|
1462 |
1467 |
@proc_close($info['a']); |
@proc_close($info['a']); |
|
... |
... |
function rg_exec2($a) |
1591 |
1596 |
|
|
1592 |
1597 |
if (empty($rx) && empty($wx)) { |
if (empty($rx) && empty($wx)) { |
1593 |
1598 |
$rg_util_debug && |
$rg_util_debug && |
1594 |
|
rg_log('DEBUG: No r/w events; sleeping...'); |
|
1595 |
|
sleep(1); |
|
|
1599 |
|
rg_log('DEBUG: No r/w events; terminating...'); |
|
1600 |
|
$terminating = TRUE; |
1596 |
1601 |
continue; |
continue; |
1597 |
1602 |
} |
} |
1598 |
1603 |
|
|