diff --git a/malloc.c b/malloc.c index 1f86a47..c6f7d85 100644 --- a/malloc.c +++ b/malloc.c @@ -602,7 +602,9 @@ COLD static void init_slow_path(void) { return; } - pthread_atfork(pre_fork, post_fork_parent, post_fork_child); + if (pthread_atfork(pre_fork, post_fork_parent, post_fork_child)) { + fatal_error("pthread_atfork failed"); + } struct random_state rng; random_state_init(&rng);