summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-03-03 19:58:53 +0000
committerMike Frysinger <vapier@gentoo.org>2009-03-03 19:58:53 +0000
commitb5e4efe51eda2d6b725e3d2841870fe41221f769 (patch)
treec8bfd45ab448fea7956a1da0a4c3350332398595 /app-shells/bash
parentFixed missing dependency and src_install problem. (diff)
downloadgentoo-2-b5e4efe51eda2d6b725e3d2841870fe41221f769.tar.gz
gentoo-2-b5e4efe51eda2d6b725e3d2841870fe41221f769.tar.bz2
gentoo-2-b5e4efe51eda2d6b725e3d2841870fe41221f769.zip
Add fix from upstream for read timeouts.
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'app-shells/bash')
-rw-r--r--app-shells/bash/ChangeLog6
-rw-r--r--app-shells/bash/bash-4.0.ebuild3
-rw-r--r--app-shells/bash/files/bash-4.0-read-timeout-reset.patch32
3 files changed, 39 insertions, 2 deletions
diff --git a/app-shells/bash/ChangeLog b/app-shells/bash/ChangeLog
index b4e57eab04dc..193d599aa809 100644
--- a/app-shells/bash/ChangeLog
+++ b/app-shells/bash/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-shells/bash
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.208 2009/02/27 00:43:38 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.209 2009/03/03 19:58:53 vapier Exp $
+
+ 03 Mar 2009; Mike Frysinger <vapier@gentoo.org>
+ +files/bash-4.0-read-timeout-reset.patch, bash-4.0.ebuild:
+ Add fix from upstream for read timeouts.
27 Feb 2009; Mike Frysinger <vapier@gentoo.org>
+files/bash-4.0-comsub-herestring.patch, bash-4.0.ebuild:
diff --git a/app-shells/bash/bash-4.0.ebuild b/app-shells/bash/bash-4.0.ebuild
index 84aaf94949b1..6a5236a03ec5 100644
--- a/app-shells/bash/bash-4.0.ebuild
+++ b/app-shells/bash/bash-4.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.0.ebuild,v 1.12 2009/02/27 00:43:38 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.0.ebuild,v 1.13 2009/03/03 19:58:53 vapier Exp $
EAPI="1"
@@ -76,6 +76,7 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-pipeline-reserved-word.patch
epatch "${FILESDIR}"/${P}-associative-array-subscripts.patch
epatch "${FILESDIR}"/${P}-comsub-herestring.patch
+ epatch "${FILESDIR}"/${P}-read-timeout-reset.patch
epatch "${FILESDIR}"/${PN}-4.0-negative-return.patch
# Log bash commands to syslog #91327
if use bashlogger ; then
diff --git a/app-shells/bash/files/bash-4.0-read-timeout-reset.patch b/app-shells/bash/files/bash-4.0-read-timeout-reset.patch
new file mode 100644
index 000000000000..7f3def339277
--- /dev/null
+++ b/app-shells/bash/files/bash-4.0-read-timeout-reset.patch
@@ -0,0 +1,32 @@
+http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00255.html
+http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00008.html
+
+*** ../bash-4.0/builtins/read.def 2009-01-15 23:11:21.000000000 -0500
+--- builtins/read.def 2009-03-02 10:15:39.000000000 -0500
+***************
+*** 370,381 ****
+ if (code)
+ {
+! #if 0
+ run_unwind_frame ("read_builtin");
+- return (EXECUTION_FAILURE);
+- #else
+ input_string[i] = '\0'; /* make sure it's terminated */
+! retval = 128+SIGALRM;;
+ goto assign_vars;
+- #endif
+ }
+ old_alrm = set_signal_handler (SIGALRM, sigalrm);
+--- 370,381 ----
+ if (code)
+ {
+! /* Tricky. The top of the unwind-protect stack is the free of
+! input_string. We want to run all the rest and use input_string,
+! so we have to remove it from the stack. */
+! remove_unwind_protect ();
+ run_unwind_frame ("read_builtin");
+ input_string[i] = '\0'; /* make sure it's terminated */
+! retval = 128+SIGALRM;
+ goto assign_vars;
+ }
+ old_alrm = set_signal_handler (SIGALRM, sigalrm);