Forum: Ruby Process::Status or exit code from popen3 win32 ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John-Mason P. Shackelford (Guest)
on 2006-05-22 19:12
(Received via mailing list)
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/... ,
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
removed_email_address@domain.invalid
http://pearsonedmeasurement.com
John-Mason P. Shackelford (Guest)
on 2006-05-30 01:51
(Received via mailing list)
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...

--
John-Mason Shackelford

Software Developer
Pearson Educational Measurement

2510 North Dodge St.
Iowa City, IA 52245
ph. 319-354-9200x6214
removed_email_address@domain.invalid
http://pearsonedmeasurement.com
This topic is locked and can not be replied to.