mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* thread_pthread.c (native_mutex_reinitialize_atfork): release and
re-acquire the lock at re-initialization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9689308994
commit
4ba0fe5fd3
3 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Dec 10 15:49:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* thread_pthread.c (native_mutex_reinitialize_atfork): release and
|
||||
re-acquire the lock at re-initialization.
|
||||
|
||||
Thu Dec 10 12:56:02 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* encoding.c (enc_replicate): add Encoding#replicate(name).
|
||||
|
|
|
@ -434,4 +434,8 @@ assert_finish 3, %q{
|
|||
Process.waitpid(pid)
|
||||
rescue NotImplementedError
|
||||
end
|
||||
}, '[ruby-core:26361]'
|
||||
}, '[ruby-core:23572]'
|
||||
|
||||
assert_equal 'ok', %q{
|
||||
Process.waitpid2(fork {sleep 1})[1].success? ? 'ok' : 'ng'
|
||||
}
|
||||
|
|
|
@ -71,7 +71,10 @@ native_mutex_initialize(pthread_mutex_t *lock)
|
|||
}
|
||||
}
|
||||
|
||||
#define native_mutex_reinitialize_atfork(lock) native_mutex_initialize(lock)
|
||||
#define native_mutex_reinitialize_atfork(lock) (\
|
||||
native_mutex_unlock(lock), \
|
||||
native_mutex_initialize(lock), \
|
||||
native_mutex_lock(lock))
|
||||
|
||||
static void
|
||||
native_mutex_destroy(pthread_mutex_t *lock)
|
||||
|
|
Loading…
Add table
Reference in a new issue