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
This commit is contained in:
shshshsh 2014-05-11 13:29:16 +00:00 committed by langerhans
parent 79b0f61dd7
commit 876a2fb5b1

View file

@ -30,6 +30,7 @@
#endif
#include <stdint.h>
#include <stdio.h>
#ifndef WIN32
#include <signal.h>
@ -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