I am trying to create multiple processes using fork() and execvp() calls, but so far I've been unsuccessful. Here is what I am trying to do:
Processes A, B, C should run at the same time. When they are finished, process D should run. When it is done, processes E and F should run.
I can call execvp() successfully by passing the program name and its arguments, but I don't know how many times I should call fork() and where. I also know how to call wait(), but again I am not sure where it should be called.
How would I do this?
I would approach this in the following manner: