In unix-like operating systems fork() is a system call which creates new process. that new process is called child process,the child process is the exact duplicate of parent process and receives a copy of the parent process memory space ,including the code,data and stack segments, except for certain differences like the return value of the fork() call. In parent process fork() returns the process ID(PID) of the child process and in child process fork() returns 0 and On failure fork() returns -1 in the parent process, and no child process is created.
Fork is a system call which creates new process by duplicating the calling process. The new process is referred to as the child process. The calling process is referred to as the parent process. It is fundamental as the child process created by fork shares text segment with parent while the rest of the segments in the process context i.e. data segment, code segment and stack segment, both processes have their own copies of them.