From: Daniel Bretoi Date: 2003-01-24T08:04:39+09:00 Subject: Re: exit status, stderr and stdout Hi Nobu, Thanks for clarifying these things for me. Is there documentatino for popen3 I can reference? I;m still not able to obtain the results you are, however: [~]$ ruby -v ruby 1.6.8 (2002-12-24) [i386-linux] [~]$ ruby -ropen3 -e 'min,out,err = Open3.popen3("ls ---");Process.wait;p $?>>8' -e:1:in `wait': No child processes (Errno::ECHILD) from -e:1 and same thing for: [~]$ ruby1.7 -ropen3 -e 'min,out,err = Open3.popen3("ls ---");Process.wait;p $?>>8' -e:1:in `wait': No child processes (Errno::ECHILD) from -e:1 Which version of ruby are you running? Any idea what might be wrong here? Daniel 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