*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: pthread_atfork | Section: 3 | Source: FreeBSD | File: pthread_atfork.3.gz
PTHREAD_ATFORK(3) FreeBSD Library Functions Manual PTHREAD_ATFORK(3) NAME pthread_atfork - register fork handlers LIBRARY POSIX Threads Library (libpthread, -lpthread) SYNOPSIS #include <pthread.h> int pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)); DESCRIPTION The pthread_atfork() function declares fork handlers to be called before and after fork(2), in the context of the thread that called fork(2). 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. RETURN VALUES If successful, the pthread_atfork() function will return zero. Otherwise an error number will be returned to indicate the error. ERRORS The pthread_atfork() function will fail if: [ENOMEM] Insufficient table space exists to record the fork handler addresses. SEE ALSO fork(2), pthread(3) STANDARDS The pthread_atfork() function is expected to conform to IEEE Std 1003.1 ("POSIX.1"). AUTHORS This manpage was written by Alex Vasylenko <[email protected]>. FreeBSD 14.1-RELEASE-p8 June 21, 2004 FreeBSD 14.1-RELEASE-p8

Navigation Options