diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-10-10 13:44:03 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-10-10 13:44:03 +0000 |
commit | e851dca13081a90d5ff7cac2343e1d2358ee2195 (patch) | |
tree | 95a8502a0b2b3571963772e7c5e157da8d15fe08 /malloc | |
parent | 508aa29154dd7056417afb48ad54865f2c04ace7 (diff) | |
download | glibc-e851dca13081a90d5ff7cac2343e1d2358ee2195.zip glibc-e851dca13081a90d5ff7cac2343e1d2358ee2195.tar.gz glibc-e851dca13081a90d5ff7cac2343e1d2358ee2195.tar.bz2 |
* malloc/arena.c (ptmalloc_unlock_all2): Reset atfork_arena_ptr.
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/arena.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/malloc/arena.c b/malloc/arena.c index a844392..039d70f 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -277,7 +277,7 @@ ptmalloc_unlock_all (void) #ifdef __linux__ -/* In LinuxThreads, unlocking a mutex in the child process after a +/* In NPTL, unlocking a mutex in the child process after a fork() is currently unsafe, whereas re-initializing it is safe and does not leak resources. Therefore, a special atfork handler is installed for the child. */ @@ -300,6 +300,7 @@ ptmalloc_unlock_all2 (void) if(ar_ptr == &main_arena) break; } mutex_init(&list_lock); + atfork_recursive_cntr = 0; } #else |