Actually I just solved this a few threads below. You can just run
Process.wait after you've done with the IO.popen and it should update
$? with the correct values.

On 3/22/06, Shea Martin <null / void.0> wrote:
> Andrew Johnson wrote:
> > On Tue, 21 Mar 2006 01:20:36 +0900, Claudio Jeker
> > <cjeker / diehard.n-r-g.com> wrote:
> >
> > [snip]
> >> Now I can IO.popen the process but there is no pclose instance method to
> >> get the exitcode back. Additionally my workaround via Process.waitpid2 does
> >> not work either. I think io.close does already all the cleanup.
> >
> > The $? variable will hold the exit status of the last child to terminate.
> >
> > andrew
> >
> $? does not work with popen, or open3.  I am not sure why one would want
> to run a  process, and monitor the output, yet not care what the exit
> status is?  One would think that this oversite will be fixed in future
> releases.
>
> ~S
>
>