#10339: Simplify spkg/pipestatus
------------------------------+---------------------------------------------
Reporter: jdemeyer | Owner: GeorgSWeber
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.6.1
Component: build | Keywords: pipestatus Makefile
Author: Jeroen Demeyer | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by leif):
Replying to [comment:22 jdemeyer]:
> Leif: what do you think of this alternative patch? I've tested that it
behaves the same as `set -o pipefail`.
Better. :)
Using `eval` twice still behaves different to what you get directly on the
command line; we could instead use:
{{{
#!sh
eval "$1 | $2 ; ecs=(\${PIPESTATUS[*]})"
if [ ${ecs[1]} -ne 0 ]; then
exit ${ecs[1]}
else
exit ${ecs[0]}
fi
}}}
The comment ''"Like this, ..."'' is a bit misleading, as we exactly fix
that undesired behavior with `pipestatus`.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10339#comment:23>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.