From 67c9f60e869905fc336293b3fcc41a51b56cff97 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Wed, 3 May 2017 20:41:26 +0000 Subject: [PATCH] Flush stdout before yes/no confirmations, to force question through pipes/tee(1)/whatever --- usr.sbin/pkg/pkg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index 13d02da5665..5e7072b722d 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -946,6 +946,7 @@ pkg_query_yes_no(void) { int ret, c; + fflush(stdout); c = getchar(); if (c == 'y' || c == 'Y') -- 2.45.0