Browse Source

unix/input: Flush the prompt after writing it to stdout.

Depending on your setup, stdout might be buffered/line-buffered.

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
pull/13673/head
YAMAMOTO Takashi 9 months ago
committed by Damien George
parent
commit
f9704ce36e
  1. 1
      ports/unix/input.c

1
ports/unix/input.c

@ -43,6 +43,7 @@ char *prompt(char *p) {
// simple read string
static char buf[256];
fputs(p, stdout);
fflush(stdout);
char *s = fgets(buf, sizeof(buf), stdin);
if (!s) {
return NULL;

Loading…
Cancel
Save