From e498180d5647d3427a7d7e6c82a9f09cf1ba439d Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Tue, 2 Apr 2013 15:45:58 +0900 Subject: [PATCH] Make sure to call fflush if estream_t is backed with stdio * common/estream.c (es_func_fp_write): Call fflush after fwrite. --- common/estream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/estream.c b/common/estream.c index 79fa40522..79e3efbb1 100644 --- a/common/estream.c +++ b/common/estream.c @@ -1275,6 +1275,7 @@ es_func_fp_write (void *cookie, const void *buffer, size_t size) #else bytes_written = fwrite (buffer, 1, size, file_cookie->fp); #endif + fflush (file_cookie->fp); } else bytes_written = size; /* Successfully written to the bit bucket. */