diff options
Diffstat (limited to 'shells/bash/files/patch-jobs.c')
-rw-r--r-- | shells/bash/files/patch-jobs.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shells/bash/files/patch-jobs.c b/shells/bash/files/patch-jobs.c new file mode 100644 index 000000000000..4e5db16b983a --- /dev/null +++ b/shells/bash/files/patch-jobs.c @@ -0,0 +1,21 @@ +# +# Fix pipefail option +# +# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00215.html +# +--- jobs.c.orig Fri Apr 23 21:28:25 2004 ++++ jobs.c Wed Aug 18 14:32:19 2004 +@@ -1778,8 +1778,11 @@ + if (pipefail_opt) + { + fail = 0; +- for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next) +- if (p->status != EXECUTION_SUCCESS) fail = p->status; ++ p = jobs[job]->pipe; ++ do { ++ if (p->status != EXECUTION_SUCCESS) fail = p->status; ++ p=p->next; ++ } while(p!=jobs[job]->pipe); + return fail; + } + |