am 56731351: Merge "bionic: fix atfork hanlder_mutex deadlock"
* commit '56731351de7230180fc99a1a4b0afd12f881b0f7': bionic: fix atfork hanlder_mutex deadlock
This commit is contained in:
commit
d7c6147eff
@ -74,6 +74,7 @@ void __bionic_atfork_run_prepare()
|
|||||||
void __bionic_atfork_run_child()
|
void __bionic_atfork_run_child()
|
||||||
{
|
{
|
||||||
struct atfork_t *cursor;
|
struct atfork_t *cursor;
|
||||||
|
pthread_mutexattr_t attr;
|
||||||
|
|
||||||
/* Call pthread_atfork() child handlers */
|
/* Call pthread_atfork() child handlers */
|
||||||
for (cursor = atfork_head.cqh_first;
|
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()
|
void __bionic_atfork_run_parent()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user