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.
32 handlers are called in reverse order of their registration, while
36 handlers are called in the order in which they were registered.
37 Any of the handlers may be NULL.
40 only async-signal-safe functions are allowed on the child side of
48 function will return zero; otherwise an error number will be returned to
55 The system lacked the necessary resources to add another handler to the list.