mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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@25843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
748fe216c2
commit
a000201fee
2 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -326,6 +326,8 @@ native_mutex_initialize(rb_thread_lock_t *lock)
|
|||
#endif
|
||||
}
|
||||
|
||||
#define native_mutex_reinitialize_atfork(lock) (void)(lock)
|
||||
|
||||
static void
|
||||
native_mutex_destroy(rb_thread_lock_t *lock)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue