This commit is contained in:
Michael Kerrisk 2007-12-25 21:39:59 +00:00
parent d19a206dbb
commit 222ad5f146
1 changed files with 16 additions and 16 deletions

View File

@ -51,37 +51,37 @@ creates a new process by duplicating the calling process.
The new process, referred to as the \fIchild\fP,
is an exact duplicate of the calling process,
referred to as the \fIparent\fP, except for the following points:
.IP * 4
.IP * 3
The child has its own unique process ID,
and this PID does not match the ID of any existing process group
.RB ( setpgid (2)).
.IP * 4
.IP *
The child's parent process ID is the same as the parent's process ID.
.IP * 4
.IP *
The child does not inherit its parent's memory locks
.RB ( mlock (2),
.BR mlockall (2)).
.IP * 4
.IP *
Process resource utilizations
.RB ( getrusage (2))
and CPU time counters
.RB ( times (2))
are reset to zero in the child.
.IP * 4
.IP *
The child's set of pending signals is initially empty
.RB ( sigpending (2)).
.IP * 4
.IP *
The child does not inherit semaphore adjustments from its parent
.RB ( semop (2)).
.IP * 4
.IP *
The child does not inherit record locks from its parent
.RB ( fcntl (2)).
.IP * 4
.IP *
The child does not inherit timers from its parent
.RB ( setitimer (2)
.BR alarm (2),
.BR timer_create (3)).
.IP * 4
.IP *
The child does not inherit outstanding asynchronous I/O operations
from its parent
.RB ( aio_read (3),
@ -91,33 +91,33 @@ The process attributes in the preceding list are all specified
in POSIX.1-2001.
The parent and child also differ with respect to the following
Linux-specific process attributes:
.IP * 4
.IP * 3
The child does not inherit directory change notifications (dnotify)
from its parent
(see the description of
.B F_NOTIFY
in
.BR fcntl (2)).
.IP * 4
.IP *
The
.BR prctl (2)
.B PR_SET_PDEATHSIG
setting is reset so that the child does not receive a signal
when its parent terminates.
.IP * 4
.IP *
Memory mappings that have been marked with the
.BR madvise (2)
.B MADV_DONTFORK
flag are not inherited across a
.BR fork ().
.IP * 4
.IP *
The termination signal of the child is always
.B SIGCHLD
(see
.BR clone (2)).
.PP
Note the following further points:
.IP * 4
.IP * 3
The child process is created with a single thread \(em the
one that called
.BR fork ().
@ -126,7 +126,7 @@ including the states of mutexes, condition variables,
and other pthreads objects; the use of
.BR pthread_atfork (3)
may be helpful for dealing with problems that this can cause.
.IP * 4
.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
@ -140,7 +140,7 @@ and
.B F_SETSIG
in
.BR fcntl (2)).
.IP * 4
.IP *
The child inherits copies of the parent's set of open message
queue descriptors (see
.BR mq_overview (7)).