Manual Page Result
0
Command: fork | Section: 2 | Source: UNIX v10 | File: fork.2
FORK(2) System Calls Manual FORK(2)
NAME
fork - spawn new process
SYNOPSIS
int fork()
DESCRIPTION
Fork is the only way new processes are created. The new process's im-
age is a copy of that of the caller of fork. The only distinction is
that the value returned in the old (parent) process is the process id
of the new (child) process, while the value returned in the child is 0.
Process ids range from 1 to 30,000. The process id is used by wait
(see exit(2)) and kill (see signal(2)).
Files open before the fork are shared, and have a common read-write
pointer. This is the way that sh(1) passes standard input and output
files and sets up pipes.
SEE ALSO
exit(2), signal(2), sh(1)
DIAGNOSTICS
EAGAIN, ENOMEM
FORK(2)