From d2e5b41369b660afef96e4fec01d16fc57c23a89 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 6 Sep 2016 15:47:40 +0200 Subject: [PATCH] client: flush stdout after printing prompt Apparently fgets() doesn't flush stdout in some libc implementations. --- client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client.c b/client.c index cd9a744..4d5e9b9 100644 --- a/client.c +++ b/client.c @@ -124,6 +124,7 @@ read_line(void) return( line ); #else printf("%s", prompt); + fflush(stdout); #endif } if (fgets(line, sizeof(line), stdin)) {