[pacman-dev] [PATCH v2 1/7] pacman: Fix delayed warnings/errors sent to stdout not stderr

Olivier Brunel jjk at jjacky.com
Fri Jan 10 10:25:12 EST 2014


Signed-off-by: Olivier Brunel <jjk at jjacky.com>
---
 src/pacman/callback.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 506692f..8c0fab5 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -528,10 +528,11 @@ void cb_progress(alpm_progress_t event, const char *pkgname, int percent,
 	if(percent == 100) {
 		alpm_list_t *i = NULL;
 		on_progress = 0;
+		fflush(stdout);
 		for(i = output; i; i = i->next) {
-			fputs((const char *)i->data, stdout);
+			fputs((const char *)i->data, stderr);
 		}
-		fflush(stdout);
+		fflush(stderr);
 		FREELIST(output);
 	} else {
 		on_progress = 1;
-- 
1.8.5.2



More information about the pacman-dev mailing list