commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd, commited] hurd: _Fork: unlock malloc before calling fork child ho


From: Samuel Thibault
Subject: [hurd, commited] hurd: _Fork: unlock malloc before calling fork child hooks
Date: Tue, 27 Jul 2021 02:06:18 +0200

The setitimer fork hook, fork_itimer, needs to call malloc inside
__mach_setup_tls, so we need to unlock malloc before calling it.
---
 sysdeps/mach/hurd/_Fork.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sysdeps/mach/hurd/_Fork.c b/sysdeps/mach/hurd/_Fork.c
index 75d45d6cad..88787f35ac 100644
--- a/sysdeps/mach/hurd/_Fork.c
+++ b/sysdeps/mach/hurd/_Fork.c
@@ -660,6 +660,7 @@ retry:
 
       /* Release malloc locks.  */
       _hurd_malloc_fork_child ();
+      call_function_static_weak (__malloc_fork_unlock_child);
 
       /* Run things that want to run in the child task to set up.  */
       RUN_HOOK (_hurd_fork_child_hook, ());
-- 
2.30.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]