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

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Feb 28 20:15:58 EST 2011


Author: matju
Date: Mon Feb 28 20:15:54 2011
New Revision: 6694

Log:
merge def launch and launch2

Modified:
    trunk/configure

Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Mon Feb 28 20:15:54 2011
@@ -67,10 +67,20 @@
 	def to_s; @a.join " or "; end
 end
 
+def launch stdin,stdout,stderr,*command # -> returncode
+	child = fork
+	child
+end
 def launch2(log,*command)
 	log << command.join(" ") << "\n"
 	r,w = IO.pipe
-	child = launch(nil,w,w,*command)
+	child = fork
+	if not child then
+		STDOUT.reopen w
+		STDERR.reopen w
+		exec *command
+		#!@#$ what happens with exception upon exec ?
+	end
 	w.close
 	log << r.readlines.join << "\n"
 	ret = join_pid(child)
@@ -88,18 +98,6 @@
 OBJS = []
 PDLIB = ["unicorn"]
 LDSO = {}
-
-def launch stdin,stdout,stderr,*command # -> returncode
-	child = fork
-	if not child then
-		STDIN .reopen stdin  if stdin
-		STDOUT.reopen stdout if stdout
-		STDERR.reopen stderr if stderr
-		exec *command
-		#!@#$ what happens with exception upon exec ?
-	end
-	child
-end
 
 def join_pid pid; Process.waitpid2(pid)[1] end
 module Future; end



More information about the Gridflow-cvs mailing list