From 708b2ee432fe264093b0160abadc8f1ad4971fb5 Mon Sep 17 00:00:00 2001 From: JLarky Date: Mon, 29 Jun 2015 19:52:17 -0700 Subject: [PATCH] do fflush instead of readline when readline is disabled. - fixes issue when output is getting buffered and is not sent until message is received or program has stopped - I used this answer http://stackoverflow.com/a/1716621/74167 for solution --- interface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interface.c b/interface.c index ed6b58c..ea5f4a1 100644 --- a/interface.c +++ b/interface.c @@ -560,7 +560,10 @@ void set_prompt (const char *s) { } void update_prompt (void) { - if (readline_disabled) { return; } + if (readline_disabled) { + fflush (stdout); + return; + } if (read_one_string) { return; } print_start (); set_prompt (get_default_prompt ());