On Dec 5, 2:16 am, Jeroen Demeyer <jdeme...@cage.ugent.be> wrote:
> The command spkg/pipestatus runs two commands in a pipeline CMD1 | CMD2
> and returns the exit status of CMD1 if CMD1 fails but CMD2 is successful
> (normally, CMD1 | CMD2 would always exit with the status of CMD2).  This
> is useful in Makefile where CMD2 is a "tee" command.
>
> In #10339, there is some disagreement about how
> spkg/pipestatus "A && B" "C"
> should behave.

What's the difference?  Right now we never call pipestatus with
arguments in this form, do we?  As long as we document what it's doing
for the possible time when we want to call it like this, just choose
one.  (I have a not-very-strong opinion that it should work the way

    (set -o pipefail; eval "$1 | $2")

does, since that's what happens with pipestatus in version 3 or later
of bash, and so that's what's currently happening on most people's
machines right now.)

Whatever else happens in #10339, perhaps documenting the precise
behavior of pipestatus should be a high priority.

--
John

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to