From 876a2fb5b1b1908deb7e95c202b637ead04820f4 Mon Sep 17 00:00:00 2001 From: shshshsh Date: Sun, 11 May 2014 13:29:16 +0000 Subject: [PATCH] Switch stdout to line buffering Use line buffering (instead of block buffering) so that messages arrive immediately in systemd-journald, tail -f debug.log, and the like. Rebased-By: Wladimir J. van der Laan Rebased-From: 283e405 --- src/init.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index 0daa11dbd..2d1578e98 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -30,6 +30,7 @@ #endif #include +#include #ifndef WIN32 #include @@ -540,6 +541,7 @@ bool AppInit2(boost::thread_group& threadGroup) fServer = GetBoolArg("-server", false); fPrintToConsole = GetBoolArg("-printtoconsole", false); fLogTimestamps = GetBoolArg("-logtimestamps", true); + setvbuf(stdout, NULL, _IOLBF, 0); #ifdef ENABLE_WALLET bool fDisableWallet = GetBoolArg("-disablewallet", false); #endif