From: Miroslav Lichvar Date: Tue, 6 Sep 2016 13:47:40 +0000 (+0200) Subject: client: flush stdout after printing prompt X-Git-Tag: 2.4.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d9d19d76ba7952a86b8266e2cfdced114fca883;p=thirdparty%2Fchrony.git client: flush stdout after printing prompt Apparently fgets() doesn't flush stdout in some libc implementations. --- diff --git a/client.c b/client.c index 477f5485..314b3a3a 100644 --- a/client.c +++ b/client.c @@ -125,6 +125,7 @@ read_line(void) return( line ); #else printf("%s", prompt); + fflush(stdout); #endif } if (fgets(line, sizeof(line), stdin)) {