Wait on the child before exiting.