D
Damphyr
OK, I'm stuck with a pretty problem:
I need to drive a build process using make (dmake) from my scripts and I
want to capture stdout and stderr as well as the return value from dmake.
Normally I would do it using Daniel Berger's win32-popen3, but I have a
Windows Installer Ruby with VC++6.0 which nastily gives me a segfault
(properly documented in the README, but still a segfault ).
Recompiling Ruby is a no-no and changing VC compiler also a no-no.
Now, does anyone have a quick solution for me?
Is there anyway to call say:
system 'echo blabla'
and to redirect stdout and stderr used by system? (I guess not).
Any help is appreciated.
I am aware of
IO.popen("dmake target 2>&1") {|f|
output = f.read
exitcode = Process.waitpid2(f.pid)[1]
}
and is currently my best choice, although I would like to split stderr
and stdout.
Cheers,
V.-
--
http://www.braveworld.net/riva
____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.
I need to drive a build process using make (dmake) from my scripts and I
want to capture stdout and stderr as well as the return value from dmake.
Normally I would do it using Daniel Berger's win32-popen3, but I have a
Windows Installer Ruby with VC++6.0 which nastily gives me a segfault
(properly documented in the README, but still a segfault ).
Recompiling Ruby is a no-no and changing VC compiler also a no-no.
Now, does anyone have a quick solution for me?
Is there anyway to call say:
system 'echo blabla'
and to redirect stdout and stderr used by system? (I guess not).
Any help is appreciated.
I am aware of
IO.popen("dmake target 2>&1") {|f|
output = f.read
exitcode = Process.waitpid2(f.pid)[1]
}
and is currently my best choice, although I would like to split stderr
and stdout.
Cheers,
V.-
--
http://www.braveworld.net/riva
____________________________________________________________________
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
http://www.freemail.gr - free email service for the Greek-speaking.