| Main index | Section 3 | Options |
#include <pthread.h>
The handlers registered with pthread_atfork() are called at the moments in time described below:
| prepare | |
| Before fork(2) processing commences in the parent process. If more than one prepare handler is registered they will be called in the opposite order they were registered. | |
| parent | |
| After fork(2) completes in the parent process. If more than one parent handler is registered they will be called in the same order they were registered. | |
| child | |
| After fork(2) processing completes in the child process. If more than one child handler is registered they will be called in the same order they were registered. | |
If no handling is desired at one or more of these three points, a null pointer may be passed as the corresponding fork handler.
| [ENOMEM] | |
| Insufficient table space exists to record the fork handler addresses. | |
| PTHREAD_ATFORK (3) | June 21, 2004 |
| Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | Never write it in C if you can do it in `awk'; Never do it in `awk' if `sed' can handle it; Never use `sed' when `tr' can do the job; Never invoke `tr' when `cat' is sufficient; Avoid using `cat' whenever possible. |
” |
| — Taylor's Laws of Programming | ||