#10339: Simplify spkg/pipestatus
------------------------+---------------------------------------------------
   Reporter:  jdemeyer  |       Owner:  GeorgSWeber        
       Type:  defect    |      Status:  new                
   Priority:  major     |   Milestone:  sage-4.6.1         
  Component:  build     |    Keywords:  pipestatus Makefile
     Author:            |    Upstream:  N/A                
   Reviewer:            |      Merged:                     
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by leif):

 Replying to [ticket:10339 jdemeyer]:
 > In my opinion, there should be only one alternative.  If we have
 something which works for old versions, why not use that for new versions
 also?

 Because it is completely inefficient; I would even use `set -o pipefail`
 in `bash` >= 3.0 directly, and not call scripts.

 IMHO Bash 3.0 is old enough to make it a prerequisite anyway.

 > In any case, it would be good to think of a more robust implementation
 of pipestatus.  I can think of the following:

 >  1. Write a simple C program using pipe(), fork(), exec(), wait().

 >  2. Use the `mkfifo` command.

 >  3. Use a temporary file:
 {{{
 EXITSTATUS=/tmp/pipestatus$$     # Obviously, we should use TMPDIR if set
 ( A; echo $? >$EXITSTATUS ) | B
 }}}

 Back to MS-DOS? ;-)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10339#comment:1>
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.

Reply via email to