In this example (p2.c), the parent process calls wait() to delay its
execution until the child finishes executing. When the child is done,
wait() returns to the parent.
I think "wait() returns to the parent " can be misleading. The wait() function never left the parent process. And, given the fork() concept was just introduced, I think it's worth being explicit.
Perhaps, something like this would resolve ambiguity:
"The wait() function, as expected, stalls execution in the parent process until it observes the child-process has finished."
Original text:
I think "wait() returns to the parent " can be misleading. The wait() function never left the parent process. And, given the fork() concept was just introduced, I think it's worth being explicit.
Perhaps, something like this would resolve ambiguity:
"The wait() function, as expected, stalls execution in the parent process until it observes the child-process has finished."