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)
  • JRuby
  • JRUBY-2804

IO.popen of 'yes' process hangs on close

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1.3
  • Fix Version/s: JRuby 1.2
  • Component/s: Core Classes/Modules
  • Labels:
    None

Description

No clear explanation for this one yet, but the following code will hang:

io = IO.popen('yes', 'r')
io.close

Basically we wait on the process when closing, but something's missing to signal the 'yes' process that it should terminate. This lead to some specs hanging (tagged as failures for now).

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Charles Oliver Nutter added a comment - 08/Feb/09 1:20 AM

Oddly enough, we were just missing a Process.destroy call to shut 'er down. So I improved PopenProcess.destroy to both destroy the actual process as well as closing streams/channels and quitting the pumpers. It didn't appear to quit the pumpers at all before, so that was a potential thread leak.

Show
Charles Oliver Nutter added a comment - 08/Feb/09 1:20 AM Oddly enough, we were just missing a Process.destroy call to shut 'er down. So I improved PopenProcess.destroy to both destroy the actual process as well as closing streams/channels and quitting the pumpers. It didn't appear to quit the pumpers at all before, so that was a potential thread leak.

People

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

Dates

  • Created:
    15/Jul/08 3:45 AM
    Updated:
    21/Mar/09 1:14 PM
    Resolved:
    08/Feb/09 1:20 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.