Wait() for child to terminate