fix waitpid exception