wait, but we wait for a specific child.

pid_t waitpid(pid_t pid, int *status, int options);
  • Process wants to block when no child has terminated
  • Status have the exit status of the child written to it
  • Options explains how to wait
    • If option is 0, waitpid blocks like C Wait
    • If option is WNOHANG, it immediately returns 0 instead of blocking if there is no existing terminated child