stdout log emitter: flush stdout after every printf() if stdout is not a terminal
This makes it possible to watch aegisub's output in realtime even if its stdout is redirected to a file. Originally committed to SVN as r6793.
This commit is contained in:
parent
d38e02c031
commit
54a08a44c1
|
@ -46,6 +46,8 @@ void EmitSTDOUT::log(SinkMessage *sm) {
|
||||||
sm->line,
|
sm->line,
|
||||||
(int)sm->len,
|
(int)sm->len,
|
||||||
sm->message);
|
sm->message);
|
||||||
|
if (!isatty(fileno(stdout)))
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace log
|
} // namespace log
|
||||||
|
|
Loading…
Reference in a new issue