summaryrefslogtreecommitdiff
path: root/lib/readline.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-03-24 08:11:31 +0100
committerSimon Josefsson <simon@josefsson.org>2009-03-24 08:11:31 +0100
commitff3844d690fc5dace081d5b9728d7464654c5a8e (patch)
tree3c6c4593bb3a96df3064cc664fde8fc6b84ed323 /lib/readline.c
parentd9576a558fefb2660292e7d4baccd23ea67ecf47 (diff)
downloadgnulib-ff3844d690fc5dace081d5b9728d7464654c5a8e.tar.gz
lib/readline.c (readline): Call fflush on stdout after printing prompt.
Diffstat (limited to 'lib/readline.c')
-rw-r--r--lib/readline.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/readline.c b/lib/readline.c
index a8db7ec68e..4be5f3457f 100644
--- a/lib/readline.c
+++ b/lib/readline.c
@@ -1,5 +1,5 @@
/* readline.c --- Simple implementation of readline.
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
Written by Simon Josefsson
This program is free software: you can redistribute it and/or modify
@@ -39,7 +39,10 @@ readline (const char *prompt)
size_t size = 0;
if (prompt)
- fputs (prompt, stdout);
+ {
+ fputs (prompt, stdout);
+ fflush (stdout);
+ }
if (getline (&out, &size, stdin) < 0)
return NULL;