See the discussion about pthread_atfork(3THR) in "The Solution--pthread_atfork(3T)".
Prototype: int pthread_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void) );