register fork handlers
cc [options] -Kthread file
int pthread_atfork(void (*prepare)(void), void (*parent)(void),
declares fork handlers
to be called before and after
in the context of the thread that called
fork handler is called before
fork handle is called after
processing completes in the parent process.
fork handler is called after
processing completes in the child process.
If no handling is desired at one or more of these three points,
the corresponding fork handler
address(es) may be set to NULL.
The order of calls to
fork handlers are called in the order
in which they were established by calls to
fork handlers are called in the opposite order.
Upon successful completion,
returns a value of zero.
Otherwise, an error number is returned to indicate the error.
If the following condition is detected,
will return the corresponding value:
insufficient table space exists to record the
fork handler addresses
The Single UNIX Specification, Version 2; The Open Group.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004