pyatfork (pypi): PyAtfork provides API to register fork handlers.
Keywords: atfork|pthread_atfork