From e143b93c444f7a6f8856d33c7c78d930961dc253 Mon Sep 17 00:00:00 2001 From: yugui Date: Tue, 3 Mar 2009 11:39:35 +0000 Subject: merges r22577, r22578 and r22642 from trunk into ruby_1_9_1. -- * thread.c (thread_cleanup_func): unlock all locked mutexes even when forking. [ruby-core:22269] -- * bootstraptest/test_thread.rb: fix for environment where fork is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_thread.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index ce90737ebf..54544df45e 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -216,6 +216,22 @@ assert_equal 'true', %{ end } +assert_equal 'ok', %{ + open("zzz.rb", "w") do |f| + f.puts <<-END + begin + Thread.new { fork { GC.start } }.join + pid, status = Process.wait2 + $result = status.success? ? :ok : :ng + rescue NotImplementedError + $result = :ok + end + END + end + require "zzz.rb" + $result +} + assert_finish 3, %{ th = Thread.new {sleep 2} th.join(1) -- cgit v1.2.3