Unlock the malloc() locks in the child process after fork(). This gives
us working malloc in the fork child of the multithreaded process. Although POSIX requires that only async-signal safe functions shall be operable after fork in multithreaded process, not having malloc lower the quality of our implementation. Tested by: rink Discussed with: kan, davidxu Reviewed by: kan MFC after: 1 month
This commit is contained in:
parent
39bd58723a
commit
e711c6f0d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185456
@ -172,6 +172,7 @@ _fork(void)
|
||||
|
||||
if (unlock_malloc) {
|
||||
_rtld_atfork_post(rtld_locks);
|
||||
_malloc_postfork();
|
||||
}
|
||||
|
||||
/* Run down atfork child handlers. */
|
||||
|
Loading…
Reference in New Issue
Block a user