rpms/bash/devel bash-sighandler.patch, 1.7, 1.8 bash.spec, 1.101, 1.102
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Jan 12 10:32:40 UTC 2006
Author: twaugh
Update of /cvs/dist/rpms/bash/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv17860
Modified Files:
bash-sighandler.patch bash.spec
Log Message:
* Thu Jan 12 2006 Tim Waugh <twaugh at redhat.com> 3.1-4
- Fix sighandler patch bug (bug #177545).
bash-sighandler.patch:
builtins/read.def | 1 +
execute_cmd.c | 1 +
input.c | 2 ++
jobs.c | 2 ++
lib/readline/input.c | 7 +++++++
lib/sh/zread.c | 9 ++++++++-
sig.c | 11 +++++++++--
sig.h | 11 +++++++++++
8 files changed, 41 insertions(+), 3 deletions(-)
Index: bash-sighandler.patch
===================================================================
RCS file: /cvs/dist/rpms/bash/devel/bash-sighandler.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- bash-sighandler.patch 2 Jan 2006 11:02:47 -0000 1.7
+++ bash-sighandler.patch 12 Jan 2006 10:32:27 -0000 1.8
@@ -1,5 +1,5 @@
--- bash-3.1/builtins/read.def.sighandler 2005-08-21 02:46:19.000000000 +0100
-+++ bash-3.1/builtins/read.def 2005-12-23 16:16:24.000000000 +0000
++++ bash-3.1/builtins/read.def 2006-01-12 10:07:49.000000000 +0000
@@ -471,6 +471,7 @@
#if 1
if (retval < 0)
@@ -9,7 +9,7 @@
return (EXECUTION_FAILURE);
}
--- bash-3.1/lib/readline/input.c.sighandler 2005-07-05 03:30:24.000000000 +0100
-+++ bash-3.1/lib/readline/input.c 2005-12-23 16:16:24.000000000 +0000
++++ bash-3.1/lib/readline/input.c 2006-01-12 10:17:30.000000000 +0000
@@ -435,6 +435,10 @@
return (c);
}
@@ -21,48 +21,50 @@
int
rl_getc (stream)
FILE *stream;
-@@ -458,6 +462,9 @@
- if (result == 0)
- return (EOF);
+@@ -450,6 +454,9 @@
+ #endif
+ result = read (fileno (stream), &c, sizeof (unsigned char));
+ if (need_termination_unwind_protect)
+ do_termination_unwind_protect (need_termination_unwind_protect);
+
- #if defined (__BEOS__)
- if (errno == EINTR)
- continue;
+ if (result == sizeof (unsigned char))
+ return (c);
+
--- bash-3.1/lib/sh/zread.c.sighandler 2005-03-10 03:17:05.000000000 +0000
-+++ bash-3.1/lib/sh/zread.c 2005-12-23 16:16:24.000000000 +0000
-@@ -34,6 +34,9 @@
++++ bash-3.1/lib/sh/zread.c 2006-01-12 10:07:49.000000000 +0000
+@@ -34,6 +34,10 @@
# define SEEK_CUR 1
#endif
+/* From bash */
+extern int need_termination_unwind_protect;
++extern void do_termination_unwind_protect (int);
+
/* Read LEN bytes from FD into BUF. Retry the read on EINTR. Any other
error causes the loop to break. */
ssize_t
-@@ -45,7 +48,7 @@
+@@ -45,7 +49,8 @@
ssize_t r;
while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
- ;
-+ if (need_termination_unwind_protect) break;
++ if (need_termination_unwind_protect)
++ do_termination_unwind_protect (need_termination_unwind_protect);
return r;
}
-@@ -73,7 +76,7 @@
+@@ -73,6 +78,8 @@
return r;
if (r == -1 && errno == EINTR)
{
-- if (++nintr > NUM_INTR)
-+ if (need_termination_unwind_protect || ++nintr > NUM_INTR)
++ if (need_termination_unwind_protect)
++ do_termination_unwind_protect (need_termination_unwind_protect);
+ if (++nintr > NUM_INTR)
return -1;
continue;
- }
--- bash-3.1/sig.c.sighandler 2005-10-22 22:04:03.000000000 +0100
-+++ bash-3.1/sig.c 2005-12-23 16:17:16.000000000 +0000
++++ bash-3.1/sig.c 2006-01-12 10:07:49.000000000 +0000
@@ -58,6 +58,8 @@
extern int loop_level, continuing, breaking;
extern int parse_and_execute_level, shell_initialized;
@@ -95,9 +97,9 @@
}
/* What we really do when SIGINT occurs. */
---- bash-3.1/sig.h.sighandler 2005-12-23 16:16:24.000000000 +0000
-+++ bash-3.1/sig.h 2005-12-23 16:16:24.000000000 +0000
-@@ -112,8 +112,12 @@
+--- bash-3.1/sig.h.sighandler 2005-10-18 21:43:31.000000000 +0100
++++ bash-3.1/sig.h 2006-01-12 10:07:49.000000000 +0000
+@@ -111,8 +111,12 @@
/* Extern variables */
extern volatile int sigwinch_received;
@@ -110,7 +112,7 @@
extern sighandler sigint_sighandler __P((int));
extern void initialize_signals __P((int));
extern void initialize_terminating_signals __P((void));
-@@ -130,4 +134,11 @@
+@@ -129,4 +133,11 @@
extern SigHandler *trap_to_sighandler __P((int));
extern sighandler trap_handler __P((int));
@@ -123,7 +125,7 @@
+
#endif /* _SIG_H_ */
--- bash-3.1/input.c.sighandler 2005-07-14 13:29:08.000000000 +0100
-+++ bash-3.1/input.c 2005-12-23 16:16:24.000000000 +0000
++++ bash-3.1/input.c 2006-01-12 10:07:49.000000000 +0000
@@ -41,6 +41,7 @@
#include "input.h"
#include "error.h"
@@ -140,9 +142,9 @@
local_bufused = read (fileno (stream), localbuf, sizeof(localbuf));
if (local_bufused > 0)
break;
---- bash-3.1/jobs.c.sighandler 2005-12-23 16:16:24.000000000 +0000
-+++ bash-3.1/jobs.c 2005-12-23 16:30:30.000000000 +0000
-@@ -2884,6 +2884,7 @@
+--- bash-3.1/jobs.c.sighandler 2005-11-12 04:13:27.000000000 +0000
++++ bash-3.1/jobs.c 2006-01-12 10:07:49.000000000 +0000
+@@ -2865,6 +2865,7 @@
: 0;
if (sigchld || block == 0)
waitpid_flags |= WNOHANG;
@@ -150,7 +152,7 @@
pid = WAITPID (-1, &status, waitpid_flags);
/* WCONTINUED may be rejected by waitpid as invalid even when defined */
-@@ -2910,6 +2911,7 @@
+@@ -2891,6 +2892,7 @@
/* If waitpid returns 0, there are running children. If it returns -1,
the only other error POSIX says it can return is EINTR. */
@@ -158,8 +160,8 @@
if (pid <= 0)
continue; /* jumps right to the test */
---- bash-3.1/execute_cmd.c.sighandler 2005-12-23 16:16:24.000000000 +0000
-+++ bash-3.1/execute_cmd.c 2005-12-23 16:16:24.000000000 +0000
+--- bash-3.1/execute_cmd.c.sighandler 2006-01-12 10:07:48.000000000 +0000
++++ bash-3.1/execute_cmd.c 2006-01-12 10:07:49.000000000 +0000
@@ -363,6 +363,7 @@
unlink_fifo_list ();
#endif /* PROCESS_SUBSTITUTION */
Index: bash.spec
===================================================================
RCS file: /cvs/dist/rpms/bash/devel/bash.spec,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- bash.spec 10 Jan 2006 12:03:50 -0000 1.101
+++ bash.spec 12 Jan 2006 10:32:28 -0000 1.102
@@ -1,7 +1,7 @@
Version: 3.1
Name: bash
Summary: The GNU Bourne Again shell (bash) version %{version}.
-Release: 3
+Release: 4
Group: System Environment/Shells
License: GPL
Url: http://www.gnu.org/software/bash
@@ -211,6 +211,9 @@
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog
+* Thu Jan 12 2006 Tim Waugh <twaugh at redhat.com> 3.1-4
+- Fix sighandler patch bug (bug #177545).
+
* Tue Jan 10 2006 Tim Waugh <twaugh at redhat.com> 3.1-3
- Patchlevel 5.
More information about the fedora-cvs-commits
mailing list