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 | a8fcf0670892c7546f6cc036026621eb7792aa84 (patch) | |
| tree | 4de67f5809f04b800ca09e16f671fcdde88d41dc /bootstraptest | |
| parent | 61680c9d2c06c5f7635111b3c54c2fb9e3a38ae4 (diff) | |
| download | ruby-a8fcf0670892c7546f6cc036026621eb7792aa84.tar.gz ruby-a8fcf0670892c7546f6cc036026621eb7792aa84.tar.xz ruby-a8fcf0670892c7546f6cc036026621eb7792aa84.zip | |
* thread.c (thread_cleanup_func): unlock all locked mutexes even when
forking. [ruby-core:22269]
git-svn-id: http://svn.ruby-lang.org/repos/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 ce90737eb..e586ee274 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) |
