Use local variable to track if pthread_atfork has ever been called.
Previous logic would deadlock on fork if log_init() was followed by log_fini() since log_fini destroys the mutex that atfork works with.
Loading
Please register or sign in to comment