diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-03 11:39:35 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-03 11:39:35 +0000 |
commit | e143b93c444f7a6f8856d33c7c78d930961dc253 (patch) | |
tree | 70c46277331bf4f837a9ce5e0f85b3f8cf96eb0a /bootstraptest | |
parent | ce5bb2273645650493a3b045d4803d6bb04a72f3 (diff) |
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
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_thread.rb | 16 |
1 files changed, 16 insertions, 0 deletions
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) |