From: Ashley Moran Date: 2006-08-30T17:02:08+09:00 Subject: Re: Evading the limit of a pipe's standard input On Wednesday 30 August 2006 08:34, Ashley Moran wrote: > � �IO.popen("psql -U test test","r+") do |pipe| > � � �Thread.new { loop { pipe.read } } � � � � � � � �# fixes it > � � �query.each { |statement| pipe.puts statement } > � �end Actually I lied... I need a "sleep 2" at the end of the IO.popen block for this to work. Is there a less magical way to sync it? (I took a stab at Process.wait but it doesn't work.) Ashley -- "If you do it the stupid way, you will have to do it again" - Gregory Chudnovsky