Consider this code snippet:
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
How shall I exit the child process if execvp returns? Shall I use exit() or _exit()?