Process::Status or exit code from popen3 win32?

Greetings all,

The win32 version of popen3 does not appear to set $? and
Process.waitpid2(pid) always seems to fail with “no child process”.
Other than Ara’s clever hack at
http://groups.google.com/group/comp.lang.ruby/msg/c0e7fc74641b9a50 ,
can anyone recommend how I can grab stdout, stderr, and the
Process::Status (or at least the return code) for a child process on
windows? My objective is to build a basic cross-platform popen4-like
method (though I do not strictly need stdin) and the lack of
Process::Status / exit code appears to be the only thing preventing me
from using win32 popen3 for that purpose.

Many thanks,

John-Mason Shackelford

Software Developer
Pearson Educational Measurement

2510 North Dodge St.
Iowa City, IA 52245
ph. 319-354-9200x6214
[email protected]
http://pearsonedmeasurement.com

Many thanks to Samuel Tesla for his helpful patch which provides
Process::Status when popen4 is called with a block, just as the unix
Open4 library does. This moves us closer to cross platform
compatiblity in capturing stdout, stderr and Process::Status for child
processes.

See
http://rubyforge.org/tracker/?func=detail&atid=413&aid=4603&group_id=85


John-Mason Shackelford

Software Developer
Pearson Educational Measurement

2510 North Dodge St.
Iowa City, IA 52245
ph. 319-354-9200x6214
[email protected]
http://pearsonedmeasurement.com