As a work around, I end up calling popen3 like this:

Open3.popen3 ("/some/command/to/run ; echo $? 1>&2") { ... }

That ensures the exit code from /some/command/to/run will be the last 
line of the standard error stream from Open3.popen3. Then I can just 
pull that line off the output to get the return code.

It may not work for all situations, but it works for me.

Jeff.

On Monday, April 7, 2003, at 10:53 AM, nobu.nokada / softhome.net wrote:

> Hi,
>
> At Tue, 8 Apr 2003 01:56:11 +0900,
> Daniel Bretoi wrote:
>> For some reason the code I had posted earlier did not always work
>> correctly. I've now rearrange the code to work properly as far as
>> running, however, now I can't seem to capture the exit status.
>
> Since open3 spawns grand child process, you cannot get the exit
> status from the command.  This is an issue discussed a couple
> times, but it's pending yet.
>
> -- 
> Nobu Nakada
>