From: "felix.leg" Date: 2010-10-08T03:40:14+09:00 Subject: popen hangs out for user input Hi, I want to use Ruby with latex,so I wrote a simple program which waits for "\typein" command called from pdflatex: #!/usr/bin/ruby file = IO.popen('pdflatex -interaction scrollmode test.tex','r+') #1 until file.readline.include? 'typein'; end file.write "a line from RUBY" file.readlines #2 file.close If I run the command from #1 in a sheel it works right: scrolls "standard" latex asks, and stops for my "\@typein=". After I answer it continues normally. But when I want do the same in Ruby with above code, it hangs out waiting for input. It looks like #2 causes this, but I don't know why...