exit status after IO.popen is wrong on Windows
----------------------------------------------
Key: JRUBY-3819
URL: http://jira.codehaus.org/browse/JRUBY-3819
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.4
Environment: Microsoft Windows Server 2003 SP2 x64
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
Reporter: Rick Ohnemus
The exit status after IO.popen is wrong on Windows. Output from the script
below under MRI is
0
1
2
3
and under jruby it is
0
256
512
768
{code:title=popen_exit_status_test.rb}
0.upto(4) do |n|
IO.popen("mes #{n}") do |ioh|
ioh.each { |line| print line }
end
puts $?.exitstatus
end
{code}
{code:title=mes.c}
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
return (argc == 1) ? 2 : atoi(argv[1]);
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email