Merge "bionic: fix atfork hanlder_mutex deadlock"
This commit is contained in:
commit
56731351de
@ -74,6 +74,7 @@ void __bionic_atfork_run_prepare()
|
||||
void __bionic_atfork_run_child()
|
||||
{
|
||||
struct atfork_t *cursor;
|
||||
pthread_mutexattr_t attr;
|
||||
|
||||
/* Call pthread_atfork() child handlers */
|
||||
for (cursor = atfork_head.cqh_first;
|
||||
@ -84,7 +85,9 @@ void __bionic_atfork_run_child()
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&handler_mutex);
|
||||
pthread_mutexattr_init(&attr);
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||||
pthread_mutex_init(&handler_mutex, &attr);
|
||||
}
|
||||
|
||||
void __bionic_atfork_run_parent()
|
||||
|
Loading…
x
Reference in New Issue
Block a user