Merge branch 'js/run-command-updates'
* js/run-command-updates: api-run-command.txt: describe error behavior of run_command functions run-command.c: squelch a "use before assignment" warning receive-pack: remove unnecessary run_status report run_command: report failure to execute the program, but optionally don't run_command: encode deadly signal number in the return value run_command: report system call errors instead of returning error codes run_command: return exit code as positive value MinGW: simplify waitpid() emulation macros
This commit is contained in:
10
git.c
10
git.c
@ -416,13 +416,9 @@ static void execv_dashed_external(const char **argv)
|
||||
* if we fail because the command is not found, it is
|
||||
* OK to return. Otherwise, we just pass along the status code.
|
||||
*/
|
||||
status = run_command_v_opt(argv, 0);
|
||||
if (status != -ERR_RUN_COMMAND_EXEC) {
|
||||
if (IS_RUN_COMMAND_ERR(status))
|
||||
die("unable to run '%s'", argv[0]);
|
||||
exit(-status);
|
||||
}
|
||||
errno = ENOENT; /* as if we called execvp */
|
||||
status = run_command_v_opt(argv, RUN_SILENT_EXEC_FAILURE);
|
||||
if (status >= 0 || errno != ENOENT)
|
||||
exit(status);
|
||||
|
||||
argv[0] = tmp;
|
||||
|
||||
|
Reference in New Issue
Block a user