Multithreaded Programming Guide

Forking Safely

pthread_atfork(3T)

See the discussion about pthread_atfork(3T) in "The Solution--pthread_atfork(3T)".

Prototype:

int pthread_atfork(void (*prepare) (void), void (*parent) (void),
    void (*child) (void) );