jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
JRuby
  • JRuby
  • JRUBY-1890 Rubicon test_io failures
  • JRUBY-1895

IO.popen does not support "-"

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Core Classes/Modules
  • Labels:
    None
  • Number of attachments :
    0

Description

popen("-") is not supported in JRuby yet

Error:

  5) Error:
test_s_popen_spawn(TestIO):
IOError: Cannot run program "-" (in directory "/Users/headius/NetBeansProjects/jruby"): -: not found
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testcase.rb:78:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run_suite'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `start_mediator'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:41:in `start'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:29:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit.rb:278:in `run'
    /Users/headius/NetBeansProjects/jruby/lib/ruby/1.8/test/unit.rb:276

Test:

  def test_s_popen_spawn
    unless WIN32
      # Spawn an interpreter - WRITE
      parent = $$
      pipe = IO.popen("-", "w")
      
      if pipe
	begin
	  assert_equal(parent, $$)
	  pipe.puts "12"
	  Process.wait pipe.pid
	  assert_equal(12, $?>>8)
	ensure
	  pipe.close
	end
      else
	buff = $stdin.gets
	exit buff.to_i
      end
      
      # Spawn an interpreter - READWRITE
      parent = $$
      p = IO.popen("-", "w+")
      
      if p
	begin
	  assert_equal(parent, $$)
	  p.puts "Hello\n"
	  assert_equal("Goodbye\n", p.gets)
	  Process.wait
	ensure
	  p.close
	end
      else
	puts "Goodbye" if $stdin.gets == "Hello\n"
	exit
      end
    end
  end   

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Vladimir Sizikov added a comment - 06/Feb/08 1:22 PM

For now, IO.popen("-") raises NotImplementedError instead of IOErorr (rev. 5849).

Show
Vladimir Sizikov added a comment - 06/Feb/08 1:22 PM For now, IO.popen("-") raises NotImplementedError instead of IOErorr (rev. 5849).
Hide
Permalink
Charles Oliver Nutter added a comment - 15/Feb/08 12:55 PM

Removing target release from issues that fit any of the following criteria:

  • No known way to fix them
  • Java integration enhancements out of scope for 1.1 release
  • Other out of scope issues for 1.1
Show
Charles Oliver Nutter added a comment - 15/Feb/08 12:55 PM Removing target release from issues that fit any of the following criteria: No known way to fix them Java integration enhancements out of scope for 1.1 release Other out of scope issues for 1.1
Charles Oliver Nutter made changes - 15/Feb/08 12:55 PM
Field Original Value New Value
Fix Version/s JRuby 1.1RC2 [ 13820 ]
Hide
Permalink
Charles Oliver Nutter added a comment - 03/Feb/09 10:53 PM

Because popen('-') in all forms requires 'fork', we will not support it. MRI does not support it on all platforms either.

Show
Charles Oliver Nutter added a comment - 03/Feb/09 10:53 PM Because popen('-') in all forms requires 'fork', we will not support it. MRI does not support it on all platforms either.
Charles Oliver Nutter made changes - 03/Feb/09 10:53 PM
Assignee Charles Oliver Nutter [ headius ]
Status Open [ 1 ] Resolved [ 5 ]
Resolution Won't Fix [ 2 ]
Charles Oliver Nutter made changes - 27/Oct/09 1:48 PM
Status Resolved [ 5 ] Closed [ 6 ]

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    Charles Oliver Nutter
Vote (0)
Watch (3)

Dates

  • Created:
    04/Jan/08 8:53 PM
    Updated:
    27/Oct/09 1:48 PM
    Resolved:
    03/Feb/09 10:53 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.