aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/openbgpd/openbgpd_status.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php
index b493236f..4547018a 100644
--- a/config/openbgpd/openbgpd_status.php
+++ b/config/openbgpd/openbgpd_status.php
@@ -59,14 +59,9 @@ function doCmdT($title, $command) {
}
fclose($fd);
} else {
- $execOutput = "";
- $execStatus = "";
- exec ($command . " 2>&1", $execOutput, $execStatus);
- for ($i = 0; isset($execOutput[$i]); $i++) {
- if ($i > 0) {
- echo "\n";
- }
- echo htmlspecialchars($execOutput[$i],ENT_NOQUOTES);
+ $fd = popen("{$command} 2>&1", "r");
+ while (($line = fgets($fd)) !== FALSE) {
+ echo htmlspecialchars($line, ENT_NOQUOTES);
}
}
echo "</pre></tr>\n";