From: Ema Fuma Date: 2008-06-16T03:00:04+09:00 Subject: Re: Timeout lengthy external executable > require 'rubygems' > require 'systemu' Thanks, with that it worked perfectly! > you cannot do this on windows safely. if you are on *nix you can > easily parse in realtime using the open4 lib, which is much more > powerful than systemu. however, only systemu is cross platform. Yes, I tried systemu and work exactly as you explained. Yes, for me it would be better to have my script cross-platform (providing for each OS the compiled executables to launch). With IO.popen I was able to parse at run-time line by line the stdout like this: IO.popen(command) do |pipe| pipe.each("\n") do |line| puts line end And it's working (Windows and OSX), the only problem I had was that timeout(10) wasn't ignored. Now what I want to achieve by the run-time parsing are two things: - display a progess of what is happening - check that the process keeps writing on stdout, so I know it's still alive. If it doesn't for 10 sec. exit the entire program. Is that possible? Thanks a lot again for your kindness! -- Posted via http://www.ruby-forum.com/.