#10339: Simplify spkg/pipestatus
------------------------------+---------------------------------------------
Reporter: jdemeyer | Owner: GeorgSWeber
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.6.1
Component: build | Keywords: pipestatus Makefile
Author: Jeroen Demeyer | Upstream: N/A
Reviewer: Leif Leonhardy | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by leif):
Replying to [comment:31 jhpalmieri]:
> I don't really care which version eventually gets used, but especially
since this issue is being debated here, it's crucial that the behavior of
pipestatus with regard to a command like `pipestatus "A && B" "C"` be
documented, say in the message at the beginning of that file or in the
comments following that, or both.
Well, my approach follows the principle of least astonishment in that it
lets `pipestatus` behave as if you issued "`cmd1 | cmd2`" at the shell
prompt (with `pipefail` set), where `cmd1` and `cmd2` are meta variables
(non-terminals) for arbitrary valid shell commands, sequences of commands
etc. included. ;-)
That's easy to document.
(I think a comment in the file is sufficient, as `pipestatus` is not
intended to be called directly by a user. A developer if in doubt would
perhaps look at the file rather than trying to call it. The usage message
should of course mention that `pipestatus` exits with the '''last''' non-
zero exit code or zero if the resulting whole statement is a pipeline,
i.e. resembles the behavior when Bash's `pipefail` option is set.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10339#comment:32>
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.