The `fork()` function is the Unix/Linux/POSIX way of creating a new process by duplicating the calling process.

The fork() function is the Unix/Linux/POSIX way of creating a new (child) process by duplicating the calling (parent) process. The new process is identical in almost every respect to its parent (see the fork specification for exceptions). The fork() system call returns values in both the child and the parent process. In the child process, it returns 0, and in the parent process it returns the pid of the new child.

Traditionally, fork was a very heavyweight operation as it involved copying all memory pages owned by the process. This is nowadays usually done by marking pages copy-on-write.

The fork tag is used for questions related to the use of the fork() and vfork() functions and system calls.

Fork is also a common term used when discussing source control. It is the act of taking a copy of a branch (i.e. branching), and is sometimes used interchangeably with the noun branch (i.e. "how do I update my fork from my master branch?). See branch for this meaning.