aboutsummaryrefslogtreecommitdiffstats
path: root/config/openbgpd/openbgpd_status.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/openbgpd/openbgpd_status.php')
-rw-r--r--config/openbgpd/openbgpd_status.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php
index b493236f..3db2781a 100644
--- a/config/openbgpd/openbgpd_status.php
+++ b/config/openbgpd/openbgpd_status.php
@@ -59,15 +59,11 @@ 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);
}
+ pclose($fd);
}
echo "</pre></tr>\n";
echo "</table>\n";