An example of UNIX System Calls.
Useful for a parent to wait for a child process to finish what its been doing.
waitpid() is a more complete version
Here is an example using wait():
In this code, if the parents run first such that rc > 0, it will immediately call wait(), which won’t return until the child has run and exited.
Thus, even if the parent runs first it’ll wait for the child to finish