fork.2: Child and parent run in separate memory spaces

fork.2 should clearly point out that child and parent
process run in separate memory spaces.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Heinrich Schuchardt 2015-02-16 11:40:46 +01:00 committed by Michael Kerrisk
parent feb9265db8
commit 7f810a615d
1 changed files with 19 additions and 3 deletions

View File

@ -46,9 +46,25 @@ fork \- create a child process
.SH DESCRIPTION
.BR fork ()
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:
The new process is referred to as the
.I child
process.
The calling process is referred to as the
.I parent
process.
The child process and the parent process run in separate memory spaces.
At the time of
.BR fork ()
both memory spaces have the same content.
Memory writes, file mappings
.RB ( mmap (2)),
and unmappings
.RB ( munmap (2))
performed by one of the processes do not affect the other.
The child process is an exact duplicate of the parent
process except for the following points:
.IP * 3
The child has its own unique process ID,
and this PID does not match the ID of any existing process group