From: Patrick Hurley Date: 2006-11-13T03:38:30+09:00 Subject: Re: testing whether a process has completed.. On 11/12/06, James Smith wrote: > OK, keeping it simple I am basically using the following code: > > IO.popen("ruby my_program.rb", "r+") do |f| > > while(process hasn't finished) # need ruby code for this > > read = f.gets > while(read != nil) > print read > read = f.gets > end > > while(waiting for input) #need ruby code for this > write "xyz" > end > > end > end > > > - I need to be able to test whether or not the ruby program is waiting > for input > - I would also like to be able to test whether or not the program has > finished running > > Can anybody help me please. > > -- > Posted via http://www.ruby-forum.com/. > > This varies by platform a little, what os are you using? pth