aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorAdam Weiss <adam@signal11.com>2014-09-10 12:26:59 -0400
committerAdam Weiss <adam@signal11.com>2014-09-10 12:48:13 -0400
commite982b574a5e8878fb50f8f75c179474f2b1661dd (patch)
tree02ca4e9f00b2f6af46a771766fca0b915e90933f /src/util.cpp
parentdef2fdb4b9b52fa908c11fe2f5a42ea04f8e9f11 (diff)
Use explicit fflush() instead of setvbuf()
Flushing after every line when printing to console is desirable when running with systemd but setvbuf() has slightly different semantics on Windows that causes warnings. Just do an explicit fflush() after each line print to console instead.
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 5a4e187f9e..20aff49c86 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -211,6 +211,7 @@ int LogPrintStr(const std::string &str)
{
// print to console
ret = fwrite(str.data(), 1, str.size(), stdout);
+ fflush(stdout);
}
else if (fPrintToDebugLog && AreBaseParamsConfigured())
{