diff options
author | Max Kellermann <max@duempel.org> | 2014-12-17 18:08:09 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-17 19:12:25 +0100 |
commit | c5720a15c76a15debadc9205afa2558f11e5d9ff (patch) | |
tree | 4e98a5a8dd77fdc778542b8cf571e0803ba322b6 /src/LogBackend.cxx | |
parent | 90709b332a5514e19d572138cbd96c9364740bf8 (diff) |
LogBackend: force-flush stderr on WIN32
setvbuf() does not seem to have an effect on Windows.
Diffstat (limited to 'src/LogBackend.cxx')
-rw-r--r-- | src/LogBackend.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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 |