SYNOPSIS
#include <pthread.h>
int pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child) (void));
DESCRIPTION
The
The order of invocation of at-fork
handlers can be used to ensure that locking hierarchy is
maintained across a call to
PARAMETERS
- prepare
-
Specifies a function to be run before a
fork() function. This parameter may be NULL, in which case no function is added to the list of prepare handlers. Prepare handlers are run in last-in-first-out order with respect to calls topthread_atfork() . - parent
-
Specifies a function to be invoked in the parent process prior to
fork() returning. This parameter may be NULL, in which case no function is added to the list of parent handlers. Parent handlers are run in first-in-first-out order with respect to calls topthread_atfork() . - child
-
Specifies a function to be invoked in the child process prior to
fork() returning. This parameter may be NULL, in which case no function is added to the list of child handlers. Child handlers are run in first-in-first-out order with respect to calls topthread_atfork() .
RETURN VALUES
On success,
CONFORMANCE
POSIX P1003.1 (1996)
MULTITHREAD SAFETY LEVEL
MT-safe.
PORTING ISSUES
Handlers established with
Handlers established with
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutForkExecl() ,_NutForkExecle() ,_NutForkExeclp() ,_NutForkExeclpe() ,_NutForkExecv() ,_NutForkExecve() ,_NutForkExecvp() ,_NutForkExecvpe() ,fork() ,vfork()
PTC MKS Toolkit 10.5 Documentation Build 40.