Merge pull request #4892

e982b57 Use explicit fflush() instead of setvbuf() (Adam Weiss)
This commit is contained in:
Wladimir J. van der Laan 2014-09-11 08:56:23 +02:00
commit 8040e938c5
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
2 changed files with 1 additions and 1 deletions

View File

@ -630,7 +630,6 @@ bool AppInit2(boost::thread_group& threadGroup)
fPrintToConsole = GetBoolArg("-printtoconsole", false); fPrintToConsole = GetBoolArg("-printtoconsole", false);
fLogTimestamps = GetBoolArg("-logtimestamps", true); fLogTimestamps = GetBoolArg("-logtimestamps", true);
fLogIPs = GetBoolArg("-logips", false); fLogIPs = GetBoolArg("-logips", false);
setvbuf(stdout, NULL, _IOLBF, 0);
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
bool fDisableWallet = GetBoolArg("-disablewallet", false); bool fDisableWallet = GetBoolArg("-disablewallet", false);
#endif #endif

View File

@ -211,6 +211,7 @@ int LogPrintStr(const std::string &str)
{ {
// print to console // print to console
ret = fwrite(str.data(), 1, str.size(), stdout); ret = fwrite(str.data(), 1, str.size(), stdout);
fflush(stdout);
} }
else if (fPrintToDebugLog && AreBaseParamsConfigured()) else if (fPrintToDebugLog && AreBaseParamsConfigured())
{ {