Create atfork.c

pthread_atfork(prefork_prepare, postfork_parent, postfork_child); tells the functions that are called.
prefork_parent is called before fork(). postfork_parent is called after fork() by the parent and postfork_child is called by child after fork().