From c5720a15c76a15debadc9205afa2558f11e5d9ff Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 17 Dec 2014 18:08:09 +0100 Subject: LogBackend: force-flush stderr on WIN32 setvbuf() does not seem to have an effect on Windows. --- src/LogBackend.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/LogBackend.cxx b/src/LogBackend.cxx index 6591fef2d..04c2e6324 100644 --- a/src/LogBackend.cxx +++ b/src/LogBackend.cxx @@ -194,6 +194,12 @@ FileLog(const Domain &domain, const char *message) domain.GetName(), chomp_length(message), message); +#ifdef WIN32 + /* force-flush the log file, because setvbuf() does not seem + to have an effect on WIN32 */ + fflush(stderr); +#endif + #ifdef HAVE_GLIB g_free(converted); #endif -- cgit v1.2.3