diff options
| author | shshshsh <[email protected]> | 2014-05-11 13:29:16 +0000 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-05-12 08:27:37 +0200 |
| commit | a39d4e3771dca644e891876db80e7821a2563a0f (patch) | |
| tree | 1529183f243699eb3d64ee90e0ec7d996f9bfe34 /src/init.cpp | |
| parent | fixes #4163 (diff) | |
| download | discoin-a39d4e3771dca644e891876db80e7821a2563a0f.tar.xz discoin-a39d4e3771dca644e891876db80e7821a2563a0f.zip | |
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 <[email protected]>
Rebased-From: 283e405
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 77c32d0b4..2c3bb0275 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 |