From a85bd201dfecf5099b3655157db250f354cde621 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Fri, 17 Jun 2005 23:14:44 +0000 Subject: [PATCH] work around readline 4.2 bug --- ipmitool/src/ipmishell.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ipmitool/src/ipmishell.c b/ipmitool/src/ipmishell.c index ee3300c..5c6998d 100644 --- a/ipmitool/src/ipmishell.c +++ b/ipmitool/src/ipmishell.c @@ -111,8 +111,9 @@ int ipmi_shell_main(struct ipmi_intf * intf, int argc, char ** argv) shell_intf = intf; rl_event_hook = rl_event_keepalive; #if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0402 - /* set to 1 second */ - rl_set_keyboard_input_timeout(1000*1000); + /* There is a bug in readline 4.2 and later (at least on FreeBSD): + * timeout equal or greater than 1 second causes an infinite loop. */ + rl_set_keyboard_input_timeout(1000 * 1000 - 1); #endif }