check pthread_atfork return value

pull/50/head
Daniel Micay 2018-08-28 21:31:20 -04:00
parent 0e2bc8a1cf
commit 19c46d16f1
1 changed files with 3 additions and 1 deletions

View File

@ -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);