Commit 4a340b9b authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor change to deal with buffering. The output looks odd cause

fread in php is buffered.
parent e352f303
......@@ -80,7 +80,12 @@ header("Pragma: no-cache");
flush();
if ($fp = popen("$TBSUEXEC_PATH $uid $pid spewlogfile $pid $eid", "r")) {
while ($string = fread($fp, 128)) {
# Since there is no nonblocking mode, read in fairly small
# chunks to avoid many lines (since lines are short) from being
# buffered up. Its annoying when watching the web page.
set_file_buffer($fp, 0);
while ($string = fread($fp, 32)) {
echo "$string";
flush();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment