fork.2: Child of MT-process is restricted to async-signal-safe functions

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-12-22 14:58:30 +01:00
parent ff76b2999b
commit 2c7c50cd6a
1 changed files with 8 additions and 0 deletions

View File

@ -161,6 +161,14 @@ and other pthreads objects; the use of
.BR pthread_atfork (3)
may be helpful for dealing with problems that this can cause.
.IP *
After a
.BR fork (2)
in a multithreaded program,
the child can safely call only async-signal-safe functions (see
.BR signal (7))
until such time as it calls
.BR execve (2).
.IP *
The child inherits copies of the parent's set of open file descriptors.
Each file descriptor in the child refers to the same
open file description (see