C
Christopher Dancy
I'm running a DRb service which accepts a string<file name> and than
processes that file name on the server side. So I've been digging around
the internet and it seems people have been running into the same
problems as me. The DRb service will execute the file ... but doing so
will block the DRb service until IO.popen is finished. A way of getting
around this is to put the executing IO.popen block into a thread ...
which does work. The problem comes when printing to standard out ... it
wont.
IO.popen("#{command_string}","w+") do |ant_output|
Thread.new {
ant_output.each do |line|
puts line
end
}
end
I need the output of the given program being run to be printed to the
screen and I can't seem to figure it out... any suggestions?
processes that file name on the server side. So I've been digging around
the internet and it seems people have been running into the same
problems as me. The DRb service will execute the file ... but doing so
will block the DRb service until IO.popen is finished. A way of getting
around this is to put the executing IO.popen block into a thread ...
which does work. The problem comes when printing to standard out ... it
wont.
IO.popen("#{command_string}","w+") do |ant_output|
Thread.new {
ant_output.each do |line|
puts line
end
}
end
I need the output of the given program being run to be printed to the
screen and I can't seem to figure it out... any suggestions?