STDIN not working under Kernel.system
-------------------------------------

                 Key: JRUBY-1923
                 URL: http://jira.codehaus.org/browse/JRUBY-1923
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1RC1
         Environment: Mac OS X Leopard. Java 1.5.0_13. JRuby says "ruby 1.8.6 
(2008-01-08 rev 5512) [ppc-jruby1.1RC1]".
            Reporter: Johan Holmberg


When an external program is started with Kernel.system, the started process 
should receive the STDIN of the JRuby script. Now JRuby simply seem to hang.

A short example will clarify (jruby will "hang" and never terminate):

    $ (echo first ; echo second)  | bin/jruby -e 'system "cat -n"'

but if MRI is used instead it works as expected (the output appears, and ruby 
terminates):

    $ (echo first ; echo second)  | ruby -e 'system "cat -n"' 
        1      first
        2      second

Looking at the source code of JRuby (src/org/jruby/util/ShellLauncher.java), it 
appears the the code *tries* to handle STDIN/STDOUT/STDERR of the started 
process. But just now it doesn't work.




-- 
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

Reply via email to