From dc793ea0a147f6d4e34b544915aa52b8b07902e1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 22 Jan 2021 07:17:36 +0100 Subject: [PATCH] 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 --- src/lib/subs/journal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/subs/journal.c b/src/lib/subs/journal.c index 93ae6635..f98d2731 100644 --- a/src/lib/subs/journal.c +++ b/src/lib/subs/journal.c @@ -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);