comment sortir d'un processus enfant - _exit() par rapport à la sortie

Considérer cet extrait de code:

pid_t cpid = fork();

if (cpid == -1) {
    perror("fork");
    exit(EXIT_FAILURE);
}

if (cpid == 0) { //in child
    execvp(argv[1], argv + 1);
    perror("execvp");
    _exit(EXIT_FAILURE);
}

//in parent

Comment vais-je quitter le processus de l'enfant si execvp retourne? Doit-je utiliser exit() ou _exit()?

InformationsquelleAutor helpermethod | 2010-02-24