--------------enig81C832E2F77E0BACDC42A184
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

I am trying to write a wrapper for a program with an interactive shell,
under windows. I am having problems with the process blocking
permanently or repeating the last command. When it is like the following
it loops forever on the puts.

IO.popen("myprogram.exe","w+") do |link|
link.puts "command"
link.close_write
result = link.readlines
p result
end

When I remove the close_write it doesn't loop but blocks on readlines. I
can modify both the interactive program and the ruby wrapper library. I
tried explicitly putting a _flushall(); call and even a _fcloseall( );
in the interactive program but neither had any effect. How should this
be done? Any advice or examples would be great.

Edward

--------------enig81C832E2F77E0BACDC42A184
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAZ8waZUwEk2PVHAwRAqAsAJ4/RfPCYoROmwCZcYN1VXrH03+C/gCdGgoR
dVAlrqx/ZEYuP8+i5nlK9eU=
=hUR4
-----END PGP SIGNATURE-----

--------------enig81C832E2F77E0BACDC42A184--