diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-05-28 22:14:55 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-05-28 22:14:55 +0000 |
commit | c0f3519d2e841dbaad086091f610cebc8178e7f6 (patch) | |
tree | 8ca703fea57ed1eefb8f5f102e2c166f5a1f912d /linuxthreads/linuxthreads.texi | |
parent | 2588068bdf891c057443ecfee136fb1bcfc3bf38 (diff) | |
download | glibc-c0f3519d2e841dbaad086091f610cebc8178e7f6.tar.gz glibc-c0f3519d2e841dbaad086091f610cebc8178e7f6.tar.xz glibc-c0f3519d2e841dbaad086091f610cebc8178e7f6.zip |
Update.
* posix/Makefile (tests): Add tst-fork.
Diffstat (limited to 'linuxthreads/linuxthreads.texi')
-rw-r--r-- | linuxthreads/linuxthreads.texi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/linuxthreads/linuxthreads.texi b/linuxthreads/linuxthreads.texi index 2b3647aed0..f50199e9fc 100644 --- a/linuxthreads/linuxthreads.texi +++ b/linuxthreads/linuxthreads.texi @@ -1314,6 +1314,20 @@ handlers are called in FIFO order (first added, first called). If there is insufficient memory available to register the handlers, @code{pthread_atfork} fails and returns @code{ENOMEM}. Otherwise it returns 0. + +The functions @code{fork} and @code{pthread_atfork} must not be regarded as +reentrant from the context of the handlers. That is to say, if a +@code{pthread_atfork} handler invoked from within @code{fork} calls +@code{pthread_atfork} or @code{fork}, the behavior is undefined. + +Registering a triplet of handlers is an atomic operation with respect to fork. +If new handlers are registered at about the same time as a fork occurs, either +all three handlers will be called, or none of them will be called. + +The handlers are inherited by the child process, and there is no +way to remove them, short of using @code{exec} to load a new +pocess image. + @end deftypefun To understand the purpose of @code{pthread_atfork}, recall that |