]> git.saurik.com Git - apple/libc.git/blobdiff - pthreads/pthread_atfork.3
Libc-997.1.1.tar.gz
[apple/libc.git] / pthreads / pthread_atfork.3
diff --git a/pthreads/pthread_atfork.3 b/pthreads/pthread_atfork.3
deleted file mode 100644 (file)
index bde2035..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-.\" Copyright (c) 2004 Apple Computer, Inc.
-.\"
-.Dd August 12, 2004
-.Dt PTHREAD_ATFORK 3
-.Os
-.Sh NAME
-.Nm pthread_atfork
-.Nd register handlers to be called before and after
-.Fn fork
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_atfork "void (*prepare)(void)" "void (*parent)(void)" "void (*child)(void)"
-.Sh DESCRIPTION
-The
-.Fn pthread_atfork
-function is used to register functions to be called before and after
-.Fn fork
-The
-.Fa prepare 
-handler is called before
-.Fn fork ,
-while the
-.Fa parent
-and
-.Fa child
-handlers are called after
-.Fn fork
-in the parent and child process, respectively.
-.Fa prepare
-handlers are called in reverse order of their registration, while
-.Fa parent
-and
-.Fa child
-handlers are called in the order in which they were registered. Any of the handlers may
-be NULL.
-.Pp
-Remember: only async-cancel-safe functions are allowed on the child side of
-.Fn fork
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_atfork
-function will return zero; otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_atfork
-will fail if:
-.Bl -tag -width Er
-.It Bq Er ENOMEM
-The system lacked the necessary resources to add another handler to the list.
-.El
-.Sh SEE ALSO
-.Xr fork 2
-.Sh STANDARDS
-.Fn pthread_atfork
-conforms to
-.St -p1003.1-96 .