aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorshshshsh <shshshsh@sdsdsdfsd.invalid>2014-05-11 13:29:16 +0000
committerWladimir J. van der Laan <laanwj@gmail.com>2014-05-12 08:27:37 +0200
commita39d4e3771dca644e891876db80e7821a2563a0f (patch)
tree1529183f243699eb3d64ee90e0ec7d996f9bfe34 /src/init.cpp
parent78363dc991eafcfec1ec5a1afad4a2759355cbd7 (diff)
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 <laanwj@gmail.com> Rebased-From: 283e405
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 77c32d0b49..2c3bb02758 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -25,6 +25,7 @@
#endif
#include <stdint.h>
+#include <stdio.h>
#ifndef WIN32
#include <signal.h>
@@ -530,6 +531,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