Ehsanul Hoque wrote: > Well, I'm sure I have nowhere as good an idea of PTY.spawn() as > Matsumoto does, but let me try to explain what your code is doing, and > how to get your desired result. > > First, you might want to consider using other methods for what you're > doing. You probably don't really need a pseudo terminal, which is what > PTY gives you, and you can use more well documented methods. Hi Ehsan, Thanks for detailed explanation. The reason why I use PTY is because I need to interact with application that does not flush its output to pipe. So when I use IO.popen or IO.pipe there is no output. PTY.spawn() solves this problem so I use it intentionally. Best regards, Denis -- Posted via http://www.ruby-forum.com/.