https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224270

--- Comment #7 from Jilles Tjoelker <jil...@freebsd.org> ---
There is a reusable piece of code in a StackOverflow answer
https://unix.stackexchange.com/questions/76162/how-do-i-capture-the-return-status-and-use-tee-at-the-same-time-in-korn-shell/76171#76171

This supports simple commands not containing words "|". By defining a function
containing the command, any command can be used. It is not the most beautiful
option but it will work and isolate the file descriptor manipulation.

It will not help if you want to set -eo pipefail to make shell "do what I mean"
but I think shell will not do proper error handling automatically with any
option setting anyway.

I already committed a small refactoring in support of -o pipefail to sh which
seems good anyway but I'm not entirely sure yet whether to add this feature.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to