diff options
| author | shshshsh <[email protected]> | 2014-05-11 13:29:16 +0000 |
|---|---|---|
| committer | langerhans <[email protected]> | 2014-06-29 15:38:46 +0200 |
| commit | 876a2fb5b1b1908deb7e95c202b637ead04820f4 (patch) | |
| tree | 9debae5bd1e68ff75a2637f666f5d170e2db9c83 /src/init.cpp | |
| parent | typo (diff) | |
| download | discoin-876a2fb5b1b1908deb7e95c202b637ead04820f4.tar.xz discoin-876a2fb5b1b1908deb7e95c202b637ead04820f4.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 0daa11dbd..2d1578e98 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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 |