Change wait to waitpid
Change wait to waitpid