Name
fork - create a child processSynopsis
#include <unistd.h>pid_t fork(void);
Description
fork() creates a new process by duplicating the calling process. The new process, referred to as the child, is an exact duplicate of the calling process, referred to as theparent, except for the following points
Return Value
On success, the PID of the child process is returned in the parent, and 0 is returned in the child. On failure, -1 is returned in the parent, no child process is created, and errno is set appropriately.
More detail: man fork