Clayton Wheeler created JRUBY-6666:
--------------------------------------

             Summary: Open3.popen3 failing due to missing handling for [path, 
argv[0]] array
                 Key: JRUBY-6666
                 URL: https://jira.codehaus.org/browse/JRUBY-6666
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.6.7
         Environment: JRuby 1.6.7, Mac OS X 10.7.3, Java 1.6.0_31 64-bit server 
VM
            Reporter: Clayton Wheeler


A BioRuby unit test is failing with JRuby 1.6.7 in 1.8 mode, when it
tries to pass a two-element array (giving the path and argv[0] value)
as the sole element of the argument list to Open3.popen3. This works
under MRI and should be permissible according to the 1.8.7
documentation.

I created RubySpec specs for Open3.popen3 to demonstrate this, at
https://github.com/rubyspec/rubyspec/pull/137. They pass under MRI and
fail under JRuby 1.6.7.

I have worked up a patch for
org.jruby.util.ShellLauncher.parseCommandLine which fixes this. Since
Java's ProcessBuilder doesn't give us a way to pass the command path
and argv[0] separately to execve, I added a bit of code to detect this
case and discard the argv[0] value. This makes the above RubySpec
pass. All tests appear to pass with "ant test", "ant
spec:ci_interpreted_18", and "ant spec:ci_interpreted_19", as well. I
will submit this as a pull request momentarily.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.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


Reply via email to