Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computing,
when a process forks, it creates a copy of itself. More generally, a
fork in a multithreading environment means that a thread of execution is
duplicated, creating a child thread from the parent thread. Under Unix
and Unix-like operating systems, the parent and the child processes can
tell each other apart by examining the return value of the fork() system
call. In the child process, the return value of fork() is 0, whereas the
return value in the parent process is the PID of the newly created child
process. The fork operation creates a separate address space for the
child. The child process has an exact copy of all the memory segments of
the parent process, though if copy-on-write semantics are implemented
actual physical memory may not be assigned.