The system call “fork” generates a copy of the current process, which runs as a child process.
This child process takes over the data and the code of the parent process and it receives a process id, the PID ("Process IDentifier").
The child process runs as an independent instance of the parent process.
By means of the return value, it possible to decide in which program we are:
0 stands for the child process.
In the case of an error: fork() returns a value smaller 0 and no child process will be created.