Date: Wed, 27 Dec 2017 22:32:17 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 224270] Get exit status of process that's piped to another: set -o pipefail is missing for /bin/sh Message-ID: <bug-224270-8-55PE4M3fl0@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-224270-8@https.bugs.freebsd.org/bugzilla/> References: <bug-224270-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224270 --- Comment #5 from Jilles Tjoelker <jilles@FreeBSD.org> --- The pipefail option was proposed for POSIX at http://austingroupbugs.net/view.php?id=3D789 but this discussion seems to be stalled. Apart from the SIGPIPE issue, it was pointed out that shell options interact poorly with functions since they are dynamically scoped (for examp= le, set -o pipefail; cmd1 | cmd2 | cmd3; r=3D$?; set +o pipefail not only affects this pipe's exit status, but also everything done by cmd1, cmd2 and cmd3 if they are functions). I will try to get this moving again. However, the implementation of set -o pipefail is simple and doing without = it or a similar feature in scripts is complicated. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224270-8-55PE4M3fl0>