From a1d416425796d192a7d30b89493971cfe9c4990e Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 23 Jan 2010 20:18:36 +0000 Subject: * thread.c (thread_start_func_2): unlock all locking mutexes before clean up. [ruby-core:26877] * thread.c (rb_thread_atfork): no other threads to be joined. * vm_core.h (rb_thread_lock_unlock, rb_thread_lock_destroy): new functions. * vm.c (ruby_vm_destruct): unlock and destroy global VM lock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vm.c') diff --git a/vm.c b/vm.c index e522c9f300..1fe25a1ca3 100644 --- a/vm.c +++ b/vm.c @@ -1498,6 +1498,8 @@ ruby_vm_destruct(void *ptr) st_free_table(vm->living_threads); vm->living_threads = 0; } + rb_thread_lock_unlock(&vm->global_vm_lock); + rb_thread_lock_destroy(&vm->global_vm_lock); ruby_xfree(vm); ruby_current_vm = 0; #if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE -- cgit v1.2.3