diff options
author | shshshsh <shshshsh@sdsdsdfsd.invalid> | 2014-05-11 13:29:16 +0000 |
---|---|---|
committer | shshshsh <shshshsh@sdsdsdfsd.invalid> | 2014-05-11 23:09:21 +0000 |
commit | 283e405c063acfca304acbff505badcbbcb814c9 (patch) | |
tree | 28102a9564fee83f0b5f97a734016e67218a6fdd /src/init.cpp | |
parent | 2653e00b127f53c7d8a8d9f2e5fa3a13cf765129 (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.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 2 |
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 |