From: Robert Klemme Date: 2009-06-18T17:07:38+09:00 Subject: Re: launch external program 2009/6/17 Joel VanderWerf : > Robert Klemme wrote: >> >> On 17.06.2009 16:02, Bertram Scharpf wrote: >>> >>>  output = "" >>>  t = Thread.new { output << `somecmd` } >>>  ... >>>  t.alive? or puts "The full output is:", output >> >> You can do this as well: >> >> t = Thread.new { `somecmd` } >> ... >> output = t.value > > Thread#value blocks while the thread is running, though. Well, yes. But what is your point? If you want the result you need to wait anyway. If not you can still use your pattern: t.alive? or puts "The full output is:", t.value Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/