- the correct exit code should be 127 accoring to bash(1),
we want to keep the same exit code behaviour as bash for rpm
rpmlog(RPMLOG_ERR, _("Exec of %s failed (%s): %s\n"),
scriptName, name, strerror(errno));
- _exit(-1);
+ _exit(127); /* exit 127 for compatibility with bash(1) */
}
pid = waitpid(child, &status, 0);
xx = execv(argv[0], argv);
}
}
- _exit(-1);
+ _exit(127); /* exit 127 for compatibility with bash(1) */
}
/**
ARGV_t argv = NULL;
argvSplit(&argv, cmd, " ");
execvp(argv[0], argv);
- exit(-1); /* error out if exec fails */
+ exit(127); /* exit with 127 for compatibility with bash(1) */
}
wait = waitpid(pid, &rc, 0);
cmd = _free(cmd);