Error "closed stream (IOError)" while fork #289

Closed
kronos opened this Issue May 15, 2010 · 2 comments

2 participants

@kronos
Rubinius member
begin
  r0, w0 = IO.pipe
  pid = fork do
    w0.close
  end
ensure
  r0.close
  w0.close # error here
end
@kronos
Rubinius member

Backtrace:

kronos:rubinius kronos$ bin/rbx x.rb
An exception occurred running x.rb
    closed stream (IOError)

Backtrace:
                          IO#close at kernel/common/io.rb:1641
                   main.__script__ at x.rb:8
  Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
  Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:88
           Rubinius::Loader#script at kernel/loader.rb:435
             Rubinius::Loader#main at kernel/loader.rb:526
             Rubinius::Loader.main at kernel/loader.rb:552
                 Object#__script__ at kernel/loader.rb:564
@evanphx
Rubinius member

Use Kernel.exit! after a forked block returns. Closed by dff9d82.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment