From e851dca13081a90d5ff7cac2343e1d2358ee2195 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 10 Oct 2005 13:44:03 +0000 Subject: [PATCH] * malloc/arena.c (ptmalloc_unlock_all2): Reset atfork_arena_ptr. --- ChangeLog | 4 ++++ malloc/arena.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index abb3830a33..a3ef3ae018 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-10-10 Ulrich Drepper + + * malloc/arena.c (ptmalloc_unlock_all2): Reset atfork_arena_ptr. + 2005-10-08 Jakub Jelinek * nss/getent.c (hosts_keys): Pass INADDRSZ as size rather diff --git a/malloc/arena.c b/malloc/arena.c index a844392a6b..039d70ff18 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