summaryrefslogtreecommitdiffstats
path: root/SOURCES/bash-3.2-2.4.4.patch
diff options
context:
space:
mode:
authorPete Travis <immanetize@fedoraproject.org>2014-10-01 11:59:35 -0600
committerPete Travis <immanetize@fedoraproject.org>2014-10-01 11:59:35 -0600
commit4a895d111d1b13ddb624a8d055d217e695361447 (patch)
tree03c8d4640a38d58fbdc5c8ef5458a2613f55e3fb /SOURCES/bash-3.2-2.4.4.patch
parentf5afed3fb60ea2a362cfd696b9edf259ca33e1da (diff)
downloadrpmbuild-sles11.2-bash.tar.gz
rpmbuild-sles11.2-bash.tar.xz
rpmbuild-sles11.2-bash.zip
sles 11.2 bash, in wholesles11.2-bash
Diffstat (limited to 'SOURCES/bash-3.2-2.4.4.patch')
-rw-r--r--SOURCES/bash-3.2-2.4.4.patch144
1 files changed, 144 insertions, 0 deletions
diff --git a/SOURCES/bash-3.2-2.4.4.patch b/SOURCES/bash-3.2-2.4.4.patch
new file mode 100644
index 0000000..3f34241
--- /dev/null
+++ b/SOURCES/bash-3.2-2.4.4.patch
@@ -0,0 +1,144 @@
+Index: array.c
+===================================================================
+--- array.c.orig
++++ array.c
+@@ -877,7 +877,7 @@ char *s, *sep;
+ * To make a running version, compile -DTEST_ARRAY and link with:
+ * xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a
+ */
+-int interrupt_immediately = 0;
++volatile sig_atomic_t interrupt_immediately = 0;
+
+ int
+ signal_is_trapped(s)
+Index: hashlib.c
+===================================================================
+--- hashlib.c.orig
++++ hashlib.c
+@@ -381,7 +381,7 @@ hash_pstats (table, name)
+
+ HASH_TABLE *table, *ntable;
+
+-int interrupt_immediately = 0;
++volatile sig_atomic_t interrupt_immediately = 0;
+
+ int
+ signal_is_trapped (s)
+Index: jobs.c
+===================================================================
+--- jobs.c.orig
++++ jobs.c
+@@ -1735,6 +1735,15 @@ make_child (command, async_p)
+ pid_t mypid;
+
+ mypid = getpid ();
++
++ if (interrupt_state)
++ {
++ struct timeval tv;
++ struct rusage rx;
++ (void) gettimeofday(&tv, NULL);
++ (void) getrusage(RUSAGE_SELF, &rx);
++ }
++
+ #if defined (BUFFERED_INPUT)
+ /* Close default_buffered_input if it's > 0. We don't close it if it's
+ 0 because that's the file descriptor used when redirecting input,
+Index: quit.h
+===================================================================
+--- quit.h.orig
++++ quit.h
+@@ -21,9 +21,13 @@
+ #if !defined (_QUIT_H_)
+ #define _QUIT_H_
+
++#define __need_sig_atomic_t
++#include <signal.h>
++#undef __need_sig_atomic_t
++
+ /* Non-zero means SIGINT has already ocurred. */
+-extern volatile int interrupt_state;
+-extern volatile int terminating_signal;
++extern volatile sig_atomic_t interrupt_state;
++extern volatile sig_atomic_t terminating_signal;
+
+ /* Macro to call a great deal. SIGINT just sets the interrupt_state variable.
+ When it is safe, put QUIT in the code, and the "interrupt" will take
+Index: sig.c
+===================================================================
+--- sig.c.orig
++++ sig.c
+@@ -61,13 +61,13 @@ extern int comsub_ignore_return;
+ extern int parse_and_execute_level, shell_initialized;
+
+ /* Non-zero after SIGINT. */
+-volatile int interrupt_state = 0;
++volatile sig_atomic_t interrupt_state = 0;
+
+ /* Non-zero after SIGWINCH */
+-volatile int sigwinch_received = 0;
++volatile sig_atomic_t sigwinch_received = 0;
+
+ /* Set to the value of any terminating signal received. */
+-volatile int terminating_signal = 0;
++volatile sig_atomic_t terminating_signal = 0;
+
+ /* The environment at the top-level R-E loop. We use this in
+ the case of error return. */
+@@ -79,10 +79,10 @@ sigset_t top_level_mask;
+ #endif /* JOB_CONTROL */
+
+ /* When non-zero, we throw_to_top_level (). */
+-int interrupt_immediately = 0;
++volatile sig_atomic_t interrupt_immediately = 0;
+
+ /* When non-zero, we call the terminating signal handler immediately. */
+-int terminate_immediately = 0;
++volatile sig_atomic_t terminate_immediately = 0;
+
+ #if defined (SIGWINCH)
+ static SigHandler *old_winch = (SigHandler *)SIG_DFL;
+Index: sig.h
+===================================================================
+--- sig.h.orig
++++ sig.h
+@@ -108,11 +108,15 @@ do { \
+
+ #endif /* JOB_CONTROL */
+
++#define __need_sig_atomic_t
++#include <signal.h>
++#undef __need_sig_atomic_t
++
+ /* Extern variables */
+-extern volatile int sigwinch_received;
++extern volatile sig_atomic_t sigwinch_received;
+
+-extern int interrupt_immediately;
+-extern int terminate_immediately;
++extern volatile sig_atomic_t interrupt_immediately;
++extern volatile sig_atomic_t terminate_immediately;
+
+ /* Functions from sig.c. */
+ extern sighandler termsig_sighandler __P((int));
+Index: examples/loadables/tee.c
+===================================================================
+--- examples/loadables/tee.c.orig
++++ examples/loadables/tee.c
+@@ -35,6 +35,7 @@
+ #include "bashansi.h"
+
+ #include <stdio.h>
++#include <signal.h>
+ #include <errno.h>
+
+ #include "builtins.h"
+@@ -56,7 +57,7 @@ static FLIST *tee_flist;
+
+ #define TEE_BUFSIZE 8192
+
+-extern int interrupt_immediately;
++extern volatile sig_atomic_t interrupt_immediately;
+
+ extern char *strerror ();
+