Wait System Call
In order to suspend the parent and handle the child properly, the wait
system call is neccssary.
wait()
takes one parameter for storing the status of the child process, for example, whether it is terminated or suspended. If you are not interested, just put NULL
as the parameter.
This is a similar program in Problem 2. However, this can get rid of zombies!
Last updated