1 .\" Copyright (c) 2004 Apple Computer, Inc.
8 .Nd register handlers to be called before and after
11 .Fd #include <pthread.h>
13 .Fn pthread_atfork "void (*prepare)(void)" "void (*parent)(void)" "void (*child)(void)"
17 function is used to register functions to be called before and after
21 handler is called before
27 handlers are called after
29 in the parent and child process, respectively.
31 handlers are called in reverse order of their registration, while
35 handlers are called in the order in which they were registered. Any of the handlers may
38 Remember: only async-cancel-safe functions are allowed on the child side of
43 function will return zero; otherwise an error number will be returned to
50 The system lacked the necessary resources to add another handler to the list.