diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-23 16:20:06 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-23 16:20:06 +0000 |
commit | c55dd9b7d8cf71f62709dab492f4221f090a6a79 (patch) | |
tree | 4de67f5809f04b800ca09e16f671fcdde88d41dc /bootstraptest | |
parent | 7019187067b9cc611f09ccf1445f484d9f609e2d (diff) | |
download | ruby-c55dd9b7d8cf71f62709dab492f4221f090a6a79.tar.gz |
* thread.c (thread_cleanup_func): unlock all locked mutexes even when
forking. [ruby-core:22269]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_thread.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index ce90737ebf..e586ee274e 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -216,6 +216,18 @@ assert_equal 'true', %{ end } +assert_equal 'ok', %{ + open("zzz.rb", "w") do |f| + f.puts <<-END + Thread.new { fork { GC.start } }.join + pid, status = Process.wait2 + $result = status.success? ? :ok : :ng + END + end + require "zzz.rb" + $result +} + assert_finish 3, %{ th = Thread.new {sleep 2} th.join(1) |