use waitpid