diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-18 09:25:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-18 09:25:11 +0000 |
commit | 748fe216c26cd7d7d7f4125339c26bf93aff690e (patch) | |
tree | 5c6cbf96233c89da1a76a8cf939c0f7829a88c99 /thread.c | |
parent | e8c17f1a59e298b336728de8f6b3497c9b13885a (diff) | |
download | ruby-748fe216c26cd7d7d7f4125339c26bf93aff690e.tar.gz |
* thread.c (rb_thread_atfork_internal): reinitialize global lock
at fork to get rid of deadlock. based on the patch from Hongli
Lai in [ruby-core:26783]. [ruby-core:26361]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -2710,6 +2710,7 @@ rb_thread_atfork_internal(int (*atfork)(st_data_t, st_data_t, st_data_t)) VALUE thval = th->self; vm->main_thread = th; + native_mutex_reinitialize_atfork(&th->vm->global_vm_lock); st_foreach(vm->living_threads, atfork, (st_data_t)th); st_clear(vm->living_threads); st_insert(vm->living_threads, thval, (st_data_t)th->thread_id); |