jobs: Implement pipefail option
commit6347b9fc52d742f36a0276cdea06cd9ad1f02c77
authorChris Novakovic <chris@chrisn.me.uk>
Fri, 22 Apr 2022 21:10:13 +0000 (22 22:10 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 5 Apr 2024 10:13:56 +0000 (5 18:13 +0800)
treec7d118e3ad9e7f2f18c954d4bbb02ace2de1f115
parent088f265909f5b85e49302d8c4d624b977ce2bd3c
jobs: Implement pipefail option

With the pipefail option set, a pipeline's exit status is the exit
status of the rightmost command that failed, or zero if all commands
succeeded.

This is planned for inclusion in the next revision of POSIX [1],
although the details are yet to be finalised. The semantics of this
implementation are the same as those proposed in [2], which have also
been adopted by the BSD shells.

[1] https://www.austingroupbugs.net/view.php?id=789
[2] https://www.austingroupbugs.net/view.php?id=789#c4115

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
src/dash.1
src/jobs.c
src/options.c
src/options.h