From 027df02dc28f3a73823282038fe1ab1d3ae3e65f Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Wed, 26 Apr 2017 09:34:32 +0300 Subject: print: handle mixing stdout and stderr printing Fixes regression from commit 5ba27c90 which caused stdio buffering issues now that output is split to stderr/stdout. See also commit 51737872 for some of the history. Fixes #7107 --- src/print.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/print.c b/src/print.c index c4e1c2f..ee89c43 100644 --- a/src/print.c +++ b/src/print.c @@ -159,6 +159,8 @@ const char *apk_error_str(int error) static void log_internal(FILE *dest, const char *prefix, const char *format, va_list va) { + if (dest != stdout) + fflush(stdout); if (prefix != NULL) fprintf(dest, "%s", prefix); vfprintf(dest, format, va); -- cgit v1.2.3-70-g09d2