...

/

Parent and Child

Parent and Child

Learn how to create a child process in C.

We have already learned, in the last lesson, that fork() replicates the code of the parent process in the child process. The code inside fork() is executed only once. Whereas, the rest of the code is executed twice. Therefore, there will be two return calls from the fork() function, ...