JRuby

Interactive subprocess via popen blocks reads while waiting for input on IBM JVM

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: IBM/Other VM
  • Labels:
    None
  • Number of attachments :
    0

Description

This test in test_launching_by_shelll_script.rb appears to freeze because the read from popen blocks when the subprocess is waiting on input (at the "read value" steps in the executed script):

    def test_interactive_child_process
      lines = []
      IO.popen(%q{sh -c 'echo enter something:; read value; echo got: $value; read value'}, 'r+') do |handle|
        begin
          while (line = handle.readline)
            lines << line
            handle.puts('foobar')
          end
        rescue EOFError
          lines << "STDIN closed"
        end
      end
      assert_equal(["enter something:\n", "got: foobar\n", "STDIN closed"], lines)
    end

For now I have disabled this test when running under IBM's JVM so we can set up a CI build for the rest of the system.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: