Example of waitpid