[Gridflow-cvs] [svn] commit: r6714 - /trunk/configure

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sat Mar 5 18:40:06 EST 2011


Author: matju
Date: Sat Mar  5 18:40:06 2011
New Revision: 6714

Log:
use IO.popen instead of Kernel#system because of what looks like a STDERR bug in Ruby (2&>1)

Modified:
    trunk/configure

Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Sat Mar  5 18:40:06 2011
@@ -62,13 +62,11 @@
 def launch(*command)
 	c=command.map{|x| x.gsub(/([!#$&*()\[\]{}`~\\\|;'"<>\?])/n, "\\\\\\1").gsub(/\n/,"\\n") }.join(" ")
 	LOG.puts c
-	LOG.flush
-	system(c+" >> config.log 2>&1")
+	IO.popen(c+" 2>&1","r") {|pipe| LOG.puts pipe.read }
 	ret = $?
 	ret = ret.to_i   if RUBY_VERSION >= "1.9"
 	ret = ret.to_int if RUBY_VERSION > "1.7"
 	LOG.puts "process returned status \##{ret}\n" if ret>0
-	LOG.flush
 	return ret<=0
 end
 



More information about the Gridflow-cvs mailing list