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 | 1544df59ba1a7a3e0bb0d71ae2735431b1c026a9 (patch) | |
| tree | 70c46277331bf4f837a9ce5e0f85b3f8cf96eb0a /bootstraptest/test_thread.rb | |
| parent | 55687a63be85edcb7c62459b1c755a8a2963e31f (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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@22733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_thread.rb')
| -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 ce90737eb..54544df45 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) |
