&1', $output, $exit); foreach ($output as $line) fwrite(STDOUT, $line."\n"); if ($exit !== 0) $result = $exit; } else { $command = 'nohup '.$base.' >> '.escapeshellarg($log).' 2>&1 < /dev/null & echo $!'; $output = array(); $exit = 1; @exec($command, $output, $exit); $pid = isset($output[0]) ? (int)$output[0] : 0; if ($exit !== 0 || $pid <= 0) { fwrite(STDERR, "Warmup für Verbindung #{$connection_id} konnte nicht gestartet werden.\n"); $result = 1; continue; } $started++; fwrite(STDOUT, "Warmup {$mode} für Verbindung #{$connection_id} gestartet (PID {$pid}).\n"); } } if (!$wait) fwrite(STDOUT, "Gestartete Warmup-Prozesse: {$started}.\n"); exit($result);