summaryrefslogtreecommitdiff
path: root/testing/source/bash/bash-4.0-patches/bash40-015
blob: c3e8d33466cafce0e68613d463ce9c16db7d460f (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
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.0
Patch-ID:	bash40-015

Bug-Reported-by:	Lubomir Rintel <lkundrak@v3.sk>
Bug-Reference-ID:	<1237654931.32737.13.camel@localhost.localdomain>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00174.html

Bug-Description:

Deferring handling of signals which should cause the shell to terminate until
it is "safe" to run the handler functions does not work for some terminating
signals.

Patch:

*** ../bash-4.0-patched/sig.c	2009-01-04 14:32:41.000000000 -0500
--- sig.c	2009-03-22 14:47:56.000000000 -0400
***************
*** 449,452 ****
--- 449,494 ----
       int sig;
  {
+   /* If we get called twice with the same signal before handling it,
+      terminate right away. */
+   if (
+ #ifdef SIGHUP
+     sig != SIGHUP &&
+ #endif
+ #ifdef SIGINT
+     sig != SIGINT &&
+ #endif
+ #ifdef SIGDANGER
+     sig != SIGDANGER &&
+ #endif
+ #ifdef SIGPIPE
+     sig != SIGPIPE &&
+ #endif
+ #ifdef SIGALRM
+     sig != SIGALRM &&
+ #endif
+ #ifdef SIGTERM
+     sig != SIGTERM &&
+ #endif
+ #ifdef SIGXCPU
+     sig != SIGXCPU &&
+ #endif
+ #ifdef SIGXFSZ
+     sig != SIGXFSZ &&
+ #endif
+ #ifdef SIGVTALRM
+     sig != SIGVTALRM &&
+ #endif
+ #ifdef SIGLOST
+     sig != SIGLOST &&
+ #endif
+ #ifdef SIGUSR1
+     sig != SIGUSR1 &&
+ #endif
+ #ifdef SIGUSR2
+    sig != SIGUSR2 &&
+ #endif
+    sig == terminating_signal)
+     terminate_immediately = 1;
+ 
    terminating_signal = sig;
  
*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 14
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 15
  
  #endif /* _PATCHLEVEL_H_ */