lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

119-upstream-bash43-019.patch (2342B)


      1 			     BASH PATCH REPORT
      2 			     =================
      3 
      4 Bash-Release:	4.3
      5 Patch-ID:	bash43-019
      6 
      7 Bug-Reported-by:	John Lenton
      8 Bug-Reference-ID:
      9 Bug-Reference-URL:	https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476
     10 
     11 Bug-Description:
     12 
     13 The -t timeout option to `read' does not work when the -e option is used.
     14 
     15 Patch (apply with `patch -p0'):
     16 
     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)
     25          RL_CHECK_SIGNALS ();
     26 +      /* non-keyboard-generated signals of interest */
     27 +      else if (_rl_caught_signal == SIGALRM
     28 +#if defined (SIGVTALRM)
     29 +		|| _rl_caught_signal == SIGVTALRM
     30 +#endif
     31 +	      )
     32 +        RL_CHECK_SIGNALS ();
     33  
     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)
     41        if (edit)
     42 -	add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
     43 +	{
     44 +	  add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
     45 +	  add_unwind_protect (bashline_reset_event_hook, (char *)NULL);
     46 +	}
     47  #endif
     48        falarm (tmsec, tmusec);
     49      }
     50 @@ -1021,6 +1024,7 @@ edit_line (p, itext)
     51  
     52    old_attempted_completion_function = rl_attempted_completion_function;
     53    rl_attempted_completion_function = (rl_completion_func_t *)NULL;
     54 +  bashline_set_event_hook ();
     55    if (itext)
     56      {
     57        old_startup_hook = rl_startup_hook;
     58 @@ -1032,6 +1036,7 @@ edit_line (p, itext)
     59  
     60    rl_attempted_completion_function = old_attempted_completion_function;
     61    old_attempted_completion_function = (rl_completion_func_t *)NULL;
     62 +  bashline_reset_event_hook ();
     63  
     64    if (ret == 0)
     65      return ret;
     66 --- a/patchlevel.h
     67 +++ b/patchlevel.h
     68 @@ -25,6 +25,6 @@
     69     regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
     70     looks for to find the patch level (for the sccs version string). */
     71  
     72 -#define PATCHLEVEL 18
     73 +#define PATCHLEVEL 19
     74  
     75  #endif /* _PATCHLEVEL_H_ */