summaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-18 09:25:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-18 09:25:46 +0000
commit29910fcb6a18bb754940edf367d3ab48062582bd (patch)
tree228c4efee9f2b155bd9533b39b4136eb133c350d /thread_pthread.c
parentd797b3a528165b221672c4b6b65aad52c0e9dde9 (diff)
downloadruby-29910fcb6a18bb754940edf367d3ab48062582bd.tar.gz
ruby-29910fcb6a18bb754940edf367d3ab48062582bd.tar.xz
ruby-29910fcb6a18bb754940edf367d3ab48062582bd.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@25843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 12db73e08..c8ee4e127 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -71,6 +71,8 @@ native_mutex_initialize(pthread_mutex_t *lock)
}
}
+#define native_mutex_reinitialize_atfork(lock) native_mutex_initialize(lock)
+
static void
native_mutex_destroy(pthread_mutex_t *lock)
{