[Bug 224270] Get exit status of process that's piped to another: set -o pipefail is missing for /bin/sh
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jan 7 17:55:15 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224270
Wolfram Schneider <wosch at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|New |Open
--- Comment #6 from Wolfram Schneider <wosch at FreeBSD.org> ---
Hi Jilles,
thanks for the pointer to the POSIX discussion.
We should be compatible with the /bin/bash. BASH is the industry standard for
shell scripts, unfortunately. For me the only reason to use the bash is the
pipefail option. I wish I could replace the first line #!/bin/bash with
#!/bin/sh and everything works as expected.
Regarding the implementation: the POSIX issue mention in the Description
section that “busybox sh” has the feature implemented. busybox is using the
ash, re-ported from NetBSD and debianized. I don’t think we can use the code
from ash due the GPL licence, but we could use some of the busybox regression
tests (./ash_test/ash-misc/pipefail.*) to make sure that our implementation
runs fine.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list