From c43236eaf78b7b74dfa7a41456d347deb2b5da1f Mon Sep 17 00:00:00 2001 From: mame Date: Mon, 23 Feb 2009 16:24:46 +0000 Subject: [PATCH] * bootstraptest/test_thread.rb: fix for environment where fork is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ bootstraptest/test_thread.rb | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c08e15445..5a11b99d65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 24 01:22:19 2009 Yusuke Endoh + + * bootstraptest/test_thread.rb: fix for environment where fork is not + available. + Tue Feb 24 01:19:38 2009 Yusuke Endoh * thread.c (thread_cleanup_func): unlock all locked mutexes even when diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index e586ee274e..02cd2029aa 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -219,9 +219,13 @@ assert_equal 'true', %{ 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 + begin + Thread.new { fork { GC.start } }.join + pid, status = Process.wait2 + $result = status.success? ? :ok : :ng + rescue NotImplementedError + :ok + end END end require "zzz.rb"