From: James Dinkel Date: 2008-09-27T04:25:28+09:00 Subject: Re: popen3 mysteriously hangs Ara Howard wrote: > > you are clogging the buffer with stdout and so the child process goes > to sleep. you have to use some caution getting both stdout and stderr > from a child process because a full buffer for either will block the > child. probably the simplest way to do what you want is > > gem install systemu > > > stdout, stderr, status = systemu command > > > this also works on windows if you need to handle the output in > realtime try using open4 (gem install open4) as it abstracts that > threaded reading for you. > > cheers. Some quick irb testing looks like systemu is going to work great. Just a quick note, though: the variables are out of order, it looks like it should be status, stdout, stderr = systemu command Thanks again! James -- Posted via http://www.ruby-forum.com/.