From: Lawrence Oluyede Date: 2005-05-14T03:05:29+09:00 Subject: Re: Get back data from a child (with exec) Ara.T.Howard@noaa.gov writes: > harp:~ > cat a.rb > IO::popen('-') do |pipe| > if pipe > stdout = pipe.read > puts "parent got <#{ stdout }> from child" > else > exec 'echo', '-n', '42' > end > end > > harp:~ > ruby a.rb > parent got <42> from child Works, but there's a problem. If I open the pipe in read/write mode and exec a program that reads from stdin it doesn't work :( -- Lawrence http://www.oluyede.org/blog