From e982b574a5e8878fb50f8f75c179474f2b1661dd Mon Sep 17 00:00:00 2001 From: Adam Weiss Date: Wed, 10 Sep 2014 12:26:59 -0400 Subject: 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. --- src/util.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/util.cpp') 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()) { -- cgit v1.2.3