ThoML
10/6/2007 3:18:00 PM
> If something is buffering output, then program it so that it doesn't
> buffer output, i.e. call flush.
Based on my own experiences, I think the OP is in a situation where
he
is looking for some kind of peekchar functionality (with some
timeout)
to check if there is some output to consume. He would have to give us
a
code example but I suspect he tries to do something like:
inout = IO.popen('ruby', File::RDWR)
inout.read
Which is tricky to handle but feasible when consuming the output
charwise and if one can tell the interpreter is ready for input and
won't output any new characters.
Anyway, the better solution would be to use open3, I think. There is
a
windows-implementation somewhere I think but I never tried it.