You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.3 KiB

  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.3
  4. Patch-ID: bash43-019
  5. Bug-Reported-by: John Lenton
  6. Bug-Reference-ID:
  7. Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476
  8. Bug-Description:
  9. The -t timeout option to `read' does not work when the -e option is used.
  10. Patch (apply with `patch -p0'):
  11. --- a/lib/readline/input.c
  12. +++ b/lib/readline/input.c
  13. @@ -534,8 +534,16 @@ rl_getc (stream)
  14. return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
  15. else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM)
  16. return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
  17. + /* keyboard-generated signals of interest */
  18. else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT)
  19. RL_CHECK_SIGNALS ();
  20. + /* non-keyboard-generated signals of interest */
  21. + else if (_rl_caught_signal == SIGALRM
  22. +#if defined (SIGVTALRM)
  23. + || _rl_caught_signal == SIGVTALRM
  24. +#endif
  25. + )
  26. + RL_CHECK_SIGNALS ();
  27. if (rl_signal_event_hook)
  28. (*rl_signal_event_hook) ();
  29. --- a/builtins/read.def
  30. +++ b/builtins/read.def
  31. @@ -442,7 +442,10 @@ read_builtin (list)
  32. add_unwind_protect (reset_alarm, (char *)NULL);
  33. #if defined (READLINE)
  34. if (edit)
  35. - add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
  36. + {
  37. + add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
  38. + add_unwind_protect (bashline_reset_event_hook, (char *)NULL);
  39. + }
  40. #endif
  41. falarm (tmsec, tmusec);
  42. }
  43. @@ -1021,6 +1024,7 @@ edit_line (p, itext)
  44. old_attempted_completion_function = rl_attempted_completion_function;
  45. rl_attempted_completion_function = (rl_completion_func_t *)NULL;
  46. + bashline_set_event_hook ();
  47. if (itext)
  48. {
  49. old_startup_hook = rl_startup_hook;
  50. @@ -1032,6 +1036,7 @@ edit_line (p, itext)
  51. rl_attempted_completion_function = old_attempted_completion_function;
  52. old_attempted_completion_function = (rl_completion_func_t *)NULL;
  53. + bashline_reset_event_hook ();
  54. if (ret == 0)
  55. return ret;
  56. --- a/patchlevel.h
  57. +++ b/patchlevel.h
  58. @@ -25,6 +25,6 @@
  59. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  60. looks for to find the patch level (for the sccs version string). */
  61. -#define PATCHLEVEL 18
  62. +#define PATCHLEVEL 19
  63. #endif /* _PATCHLEVEL_H_ */