diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_thread.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 921f5a01c1..eebedb053b 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -1205,6 +1205,17 @@ q.pop assert_predicate(status, :success?, bug9751) end if Process.respond_to?(:fork) + def test_fork_while_locked + m = Mutex.new + thrs = [] + 3.times do |i| + thrs << Thread.new { m.synchronize { Process.waitpid2(fork{})[1] } } + end + thrs.each do |t| + assert_predicate t.value, :success?, '[ruby-core:85940] [Bug #14578]' + end + end if Process.respond_to?(:fork) + def test_subclass_no_initialize t = Module.new do break eval("class C\u{30b9 30ec 30c3 30c9} < Thread; self; end") |