summaryrefslogtreecommitdiffstats
path: root/source/a/bash/bash-4.3-patches/bash43-019
blob: a93714bebc4d34bd8718693030677c55c6a5d158 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.3
Patch-ID:	bash43-019

Bug-Reported-by:	John Lenton
Bug-Reference-ID:
Bug-Reference-URL:	https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476

Bug-Description:

The -t timeout option to `read' does not work when the -e option is used.

Patch (apply with `patch -p0'):

*** ../bash-4.3-patched/lib/readline/input.c	2014-01-10 15:07:08.000000000 -0500
--- lib/readline/input.c	2014-05-22 18:40:59.000000000 -0400
***************
*** 535,540 ****
--- 538,551 ----
        else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM)
  	return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
+       /* keyboard-generated signals of interest */
        else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT)
          RL_CHECK_SIGNALS ();
+       /* non-keyboard-generated signals of interest */
+       else if (_rl_caught_signal == SIGALRM
+ #if defined (SIGVTALRM)
+ 		|| _rl_caught_signal == SIGVTALRM
+ #endif
+ 	      )
+         RL_CHECK_SIGNALS ();
  
        if (rl_signal_event_hook)
*** ../bash-4.3-patched/builtins/read.def	2013-09-02 11:54:00.000000000 -0400
--- builtins/read.def	2014-05-08 11:43:35.000000000 -0400
***************
*** 443,447 ****
  #if defined (READLINE)
        if (edit)
! 	add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
  #endif
        falarm (tmsec, tmusec);
--- 443,450 ----
  #if defined (READLINE)
        if (edit)
! 	{
! 	  add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
! 	  add_unwind_protect (bashline_reset_event_hook, (char *)NULL);
! 	}
  #endif
        falarm (tmsec, tmusec);
***************
*** 1022,1025 ****
--- 1025,1029 ----
    old_attempted_completion_function = rl_attempted_completion_function;
    rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+   bashline_set_event_hook ();
    if (itext)
      {
***************
*** 1033,1036 ****
--- 1037,1041 ----
    rl_attempted_completion_function = old_attempted_completion_function;
    old_attempted_completion_function = (rl_completion_func_t *)NULL;
+   bashline_reset_event_hook ();
  
    if (ret == 0)
*** ../bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- patchlevel.h	2014-03-20 20:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 18
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 19
  
  #endif /* _PATCHLEVEL_H_ */