From: Daniel Bretoi Date: 2003-01-24T08:33:11+09:00 Subject: Re: exit status, stderr and stdout In perl, I was able to do this, my $pid = open3($wtr, $rdr, $err, "ls ---"); waitpid($pid,WNOHANG); warn $? >> 8; however, looking at the code for open3.rb it doesn't seem possible to capture the pid (infact, it seems to be completely discarded). Does anyone know the reason for this? db On Fri, Jan 24, 2003 at 07:45:15AM +0900, nobu.nokada@softhome.net wrote: > Hi, > > At Fri, 24 Jan 2003 07:26:34 +0900, > Daniel Bretoi wrote: > > min,out,err = Open3.popen3("ls ---"); > > Did you "Process.wait" here? > > > p $? >> 8 > > > > => 255 > > $ ruby -ropen3 -e 'min,out,err = Open3.popen3("ls ---");p $?' > nil > [nobu@sharui:~/src/ruby/rough/lib/testunit 07:42:40] > $ ruby -ropen3 -e 'min,out,err = Open3.popen3("ls ---");Process.wait;p $?>>8' > 1 > > $? won't be set until Process.wait return. > > -- > Nobu Nakada -- Jan 23 Ernst Abbe born, 1840, formulated diffraction theory Jan 23 Humphrey Bogart born in New York City, 1899 Jan 23 John Hancock born, 1737 Jan 23 Joseph Hewes born, 1730 Jan 23 Samuel Barber died, 1981 Jan 23 Feast of St. Ildefonsus Jan 23 National Handwriting Day