* thread.c (thread_cleanup_func): delete locking_mutex when thread
object become dummy because of fork. [ruby-core:26744] [ruby-core:26745] * bootstraptest/test_thread.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4a761c3209
commit
31c0e3385f
@ -1,3 +1,11 @@
|
||||
Mon Nov 16 00:06:26 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* thread.c (thread_cleanup_func): delete locking_mutex when thread
|
||||
object become dummy because of fork. [ruby-core:26744]
|
||||
[ruby-core:26745]
|
||||
|
||||
* bootstraptest/test_thread.rb: add a test for above.
|
||||
|
||||
Sat Nov 14 21:54:46 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* class.c (rb_mod_init_copy): fix memory leak of Class#dup.
|
||||
|
@ -385,3 +385,26 @@ assert_equal 'ok', %q{
|
||||
end
|
||||
:ok
|
||||
}
|
||||
|
||||
assert_equal 'ok', %{
|
||||
open("zzz.rb", "w") do |f|
|
||||
f.puts <<-END
|
||||
begin
|
||||
m = Mutex.new
|
||||
Thread.new { m.lock; sleep 1 }
|
||||
sleep 0.3
|
||||
Thread.new do
|
||||
sleep 0.3
|
||||
fork { GC.start }
|
||||
end
|
||||
m.lock
|
||||
pid, status = Process.wait2
|
||||
$result = status.success? ? :ok : :ng
|
||||
rescue NotImplementedError
|
||||
$result = :ok
|
||||
end
|
||||
END
|
||||
end
|
||||
require "./zzz.rb"
|
||||
$result
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user