waitpid() changed to wait()