journal: Don't immediately flush output events to disk

Commit 478566258 'New journal event "output"' (v4.3.27) claims "Output
events are *not* flushed to disk immediately."  They are.  Accident.
Implement the missing bit.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2021-01-22 07:17:36 +01:00
parent bfac52eb6d
commit dc793ea0a1

View file

@ -128,7 +128,8 @@ journal_entry_end(int newline, int flush)
if (!newline)
fputc('\\', journal);
fputc('\n', journal);
fflush(journal);
if (flush)
fflush(journal);
if (ferror(journal)) {
logerror("Error writing journal (%s)", strerror(errno));
clearerr(journal);