]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
client: flush stdout after printing prompt
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 6 Sep 2016 13:47:40 +0000 (15:47 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 21 Nov 2016 11:02:51 +0000 (12:02 +0100)
Apparently fgets() doesn't flush stdout in some libc implementations.

client.c

index 477f54854dcf71ec33d65404e8f7b514bfb6a756..314b3a3a250320d7becc5b58cbc9451eb8d4f6ee 100644 (file)
--- 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)) {