summaryrefslogtreecommitdiff
path: root/data/bash/bash44-021
blob: 37da331d56b2f5b12d09b6e2658e3b459a0a2e90 (plain)
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
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.4
Patch-ID:	bash44-021

Bug-Reported-by:	werner@suse.de
Bug-Reference-ID:	<201803281402.w2SE2VOa000476@noether.suse.de>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2018-03/msg00196.html

Bug-Description:

A SIGINT received inside a SIGINT trap handler can possibly cause the
shell to loop.

Patch (apply with `patch -p0'):

*** ../bash-20180329/jobs.c	2018-02-11 18:07:22.000000000 -0500
--- jobs.c	2018-04-02 14:24:21.000000000 -0400
***************
*** 2690,2694 ****
    if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB))
      {
!       old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
        waiting_for_child = 0;
        if (old_sigint_handler == SIG_IGN)
--- 2690,2704 ----
    if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB))
      {
!       SigHandler *temp_sigint_handler;
! 
!       temp_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
!       if (temp_sigint_handler == wait_sigint_handler)
!         {
! #if defined (DEBUG)
! 	  internal_warning ("wait_for: recursively setting old_sigint_handler to wait_sigint_handler: running_trap = %d", running_trap);
! #endif
!         }
!       else
! 	old_sigint_handler = temp_sigint_handler;
        waiting_for_child = 0;
        if (old_sigint_handler == SIG_IGN)
*** ../bash-4.4/patchlevel.h	2016-06-22 14:51:03.000000000 -0400
--- patchlevel.h	2016-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 20
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 21
  
  #endif /* _PATCHLEVEL_H_ */