ruby-changes:14032
From: nobu <ko1@a...>
Date: Wed, 18 Nov 2009 18:26:15 +0900 (JST)
Subject: [ruby-changes:14032] Ruby:r25843 (trunk): * thread.c (rb_thread_atfork_internal): reinitialize global lock
nobu 2009-11-18 18:25:46 +0900 (Wed, 18 Nov 2009) New Revision: 25843 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25843 Log: * 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] Modified files: trunk/thread_pthread.c trunk/thread_win32.c Index: thread_win32.c =================================================================== --- thread_win32.c (revision 25842) +++ thread_win32.c (revision 25843) @@ -326,6 +326,8 @@ #endif } +#define native_mutex_reinitialize_atfork(lock) (void)(lock) + static void native_mutex_destroy(rb_thread_lock_t *lock) { Index: thread_pthread.c =================================================================== --- thread_pthread.c (revision 25842) +++ thread_pthread.c (revision 25843) @@ -71,6 +71,8 @@ } } +#define native_mutex_reinitialize_atfork(lock) native_mutex_initialize(lock) + static void native_mutex_destroy(pthread_mutex_t *lock) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/