summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Alfredsen <loki_val@gentoo.org>2009-01-15 15:57:23 +0100
committerPeter Alfredsen <loki_val@gentoo.org>2009-01-15 15:57:23 +0100
commit2816badf9c3e457daa69b61ff8254bd5c16aa151 (patch)
tree09c1cf0557b81362ee8f897714db70d7bb393928 /app-shells/bash/files/bash-2.05b-jobs.patch
parentLose old ebuild. (diff)
downloadloki_val-2816badf9c3e457daa69b61ff8254bd5c16aa151.tar.gz
loki_val-2816badf9c3e457daa69b61ff8254bd5c16aa151.tar.bz2
loki_val-2816badf9c3e457daa69b61ff8254bd5c16aa151.zip
Add version of bash-4.0-rc1 that compiles
Diffstat (limited to 'app-shells/bash/files/bash-2.05b-jobs.patch')
-rw-r--r--app-shells/bash/files/bash-2.05b-jobs.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-2.05b-jobs.patch b/app-shells/bash/files/bash-2.05b-jobs.patch
new file mode 100644
index 0000000..6d68059
--- /dev/null
+++ b/app-shells/bash/files/bash-2.05b-jobs.patch
@@ -0,0 +1,27 @@
+diff -Nru bash-2.05b.old/jobs.c bash-2.05b/jobs.c
+--- bash-2.05b.old/jobs.c 2004-09-28 04:24:20.656378576 -0400
++++ bash-2.05b/jobs.c 2004-09-28 04:24:30.586868912 -0400
+@@ -2423,6 +2423,7 @@
+ PROCESS *child;
+ pid_t pid;
+ int call_set_current, last_stopped_job, job, children_exited, waitpid_flags;
++ static int wcontinued_not_supported = 0;
+
+ call_set_current = children_exited = 0;
+ last_stopped_job = NO_JOB;
+@@ -2436,7 +2437,15 @@
+ : 0;
+ if (sigchld || block == 0)
+ waitpid_flags |= WNOHANG;
++ retry:
++ if (wcontinued_not_supported)
++ waitpid_flags &= ~WCONTINUED;
+ pid = WAITPID (-1, &status, waitpid_flags);
++ if (pid == -1 && errno == EINVAL)
++ {
++ wcontinued_not_supported = 1;
++ goto retry;
++ }
+
+ /* The check for WNOHANG is to make sure we decrement sigchld only
+ if it was non-zero before we called waitpid. */