I was wondering how fork() executes, that is does the child finish first then lets the parent finish or do they execute at the same time working on the same code?
Also my other question is: if i have 2 processes parent and its child and now I want to create a 3rd process running of the child of the parent. Now the 3rd process will become the child of the child process. So the 2nd process will now also be a parent process as well as a child process. How would I use if thens to do this?