From: James Gray Date: 2009-04-20T11:43:00+09:00 Subject: Re: what's the differences between IO.popen ( or IO.pipe) and PTY.spawn?? On Apr 19, 2009, at 9:17 PM, Jun Young Kim wrote: > The program I want to execute as a external program in ruby is using > a write system call. > > When I use IO.popen or IO.pipe, there is no output because of the > external program didn't flush it's output. (but, when I executed it > in shell, normally it shows up outputs). Try doing it this way: output = IO.popen("command here", "w+") { |cmd| cmd.close_write cmd.read } A lot of times, closing the writing stream will trigger the output. Hope that helps. James Edward Gray II