summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-01-07 14:23:35 +0000
committerMike Frysinger <vapier@gentoo.org>2014-01-07 14:23:35 +0000
commit6b63fd554d6345be82539535f49fd757e82d0a4e (patch)
treeaa28dce1b6f57595930f64f1fa2ce040cddcc361 /app-shells/bash/files
parentStable for HPPA (bug #497246). (diff)
downloadgentoo-2-6b63fd554d6345be82539535f49fd757e82d0a4e.tar.gz
gentoo-2-6b63fd554d6345be82539535f49fd757e82d0a4e.tar.bz2
gentoo-2-6b63fd554d6345be82539535f49fd757e82d0a4e.zip
Add workaround from upstream for read() under buggy BSD kernels #447810 by Yuta SATOH.
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'app-shells/bash/files')
-rw-r--r--app-shells/bash/files/bash-4.2-read-retry.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-4.2-read-retry.patch b/app-shells/bash/files/bash-4.2-read-retry.patch
new file mode 100644
index 000000000000..44903c68afe1
--- /dev/null
+++ b/app-shells/bash/files/bash-4.2-read-retry.patch
@@ -0,0 +1,41 @@
+https://bugs.gentoo.org/447810
+
+fix from upstream to workaround broken BSD kernels
+
+commit 208fdb509e072977ae7a621e916dfcd32c76047d
+Author: Chet Ramey <chet@caleb.ins.cwru.edu>
+Date: Mon Mar 4 08:09:29 2013 -0500
+
+ commit bash-20130201 snapshot
+
+diff --git a/redir.c b/redir.c
+index d7da2f3..aa3d16d 100644
+--- a/redir.c
++++ b/redir.c
+@@ -650,7 +650,7 @@ redir_open (filename, flags, mode, ri)
+ int flags, mode;
+ enum r_instruction ri;
+ {
+- int fd, r;
++ int fd, r, e;
+
+ r = find_string_in_alist (filename, _redir_special_filenames, 1);
+ if (r >= 0)
+@@ -666,7 +666,16 @@ redir_open (filename, flags, mode, ri)
+ }
+ else
+ {
+- fd = open (filename, flags, mode);
++ do
++ {
++ fd = open (filename, flags, mode);
++ e = errno;
++ if (fd < 0 && e == EINTR)
++ QUIT;
++ errno = e;
++ }
++ while (fd < 0 && errno == EINTR);
++
+ #if defined (AFS)
+ if ((fd < 0) && (errno == EACCES))
+ {