Chapter 8: Add waitpid