diff options
Diffstat (limited to 'test/ruby/test_fiber.rb')
-rw-r--r-- | test/ruby/test_fiber.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index 7127a9cb12..9bac234252 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -248,5 +248,21 @@ class TestFiber < Test::Unit::TestCase f.transfer } end + + def test_fork_from_fiber + begin + Process.fork{} + rescue NotImplementedError + return + end + bug5700 = '[ruby-core:41456]' + pid = nil + assert_nothing_raised(bug5700) do + Fiber.new{ pid = fork {} }.resume + end + pid, status = Process.waitpid2(pid) + assert_equal(0, status.exitstatus, bug5700) + assert_equal(false, status.signaled?, bug5700) + end end |