summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_fiber.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb
index ed7ecc71ae..49736f5a89 100644
--- a/test/ruby/test_fiber.rb
+++ b/test/ruby/test_fiber.rb
@@ -220,5 +220,21 @@ class TestFiber < Test::Unit::TestCase
end
assert_equal("Can't call on top of Fiber or Thread", error.message, bug5083)
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