7 Bug-Reported-by: John Lenton
9 Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476
13 The -t timeout option to `read' does not work when the -e option is used.
15 Patch (apply with `patch -p0'):
17 --- a/lib/readline/input.c
18 +++ b/lib/readline/input.c
19 @@ -534,8 +534,16 @@ rl_getc (stream)
20 return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
21 else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM)
22 return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
23 + /* keyboard-generated signals of interest */
24 else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT)
26 + /* non-keyboard-generated signals of interest */
27 + else if (_rl_caught_signal == SIGALRM
28 +#if defined (SIGVTALRM)
29 + || _rl_caught_signal == SIGVTALRM
32 + RL_CHECK_SIGNALS ();
34 if (rl_signal_event_hook)
35 (*rl_signal_event_hook) ();
36 --- a/builtins/read.def
37 +++ b/builtins/read.def
38 @@ -442,7 +442,10 @@ read_builtin (list)
39 add_unwind_protect (reset_alarm, (char *)NULL);
40 #if defined (READLINE)
42 - add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
44 + add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
45 + add_unwind_protect (bashline_reset_event_hook, (char *)NULL);
48 falarm (tmsec, tmusec);
50 @@ -1021,6 +1024,7 @@ edit_line (p, itext)
52 old_attempted_completion_function = rl_attempted_completion_function;
53 rl_attempted_completion_function = (rl_completion_func_t *)NULL;
54 + bashline_set_event_hook ();
57 old_startup_hook = rl_startup_hook;
58 @@ -1032,6 +1036,7 @@ edit_line (p, itext)
60 rl_attempted_completion_function = old_attempted_completion_function;
61 old_attempted_completion_function = (rl_completion_func_t *)NULL;
62 + bashline_reset_event_hook ();
69 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
70 looks for to find the patch level (for the sccs version string). */
72 -#define PATCHLEVEL 18
73 +#define PATCHLEVEL 19
75 #endif /* _PATCHLEVEL_H_ */