summaryrefslogtreecommitdiff
path: root/run-command.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-11-30 22:40:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-12-02 10:04:50 (GMT)
commit13274526c1fc62fd0f15fe2bc188843982f38ec9 (patch)
tree9344ae99dc8c156f94725fb29e45d5621ae989e1 /run-command.c
parentf07e5551a845b45076bf5c45118e16efa69610c4 (diff)
downloadgit-13274526c1fc62fd0f15fe2bc188843982f38ec9.zip
git-13274526c1fc62fd0f15fe2bc188843982f38ec9.tar.gz
git-13274526c1fc62fd0f15fe2bc188843982f38ec9.tar.bz2
run-command: drop silent_exec_failure arg from wait_or_whine
We do not actually use this parameter; instead we complain from the child itself (for fork/exec) or from start_command (if we are using spawn on Windows). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/run-command.c b/run-command.c
index 3b982e4..3aae270 100644
--- a/run-command.c
+++ b/run-command.c
@@ -226,7 +226,7 @@ static inline void set_cloexec(int fd)
fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
}
-static int wait_or_whine(pid_t pid, const char *argv0, int silent_exec_failure)
+static int wait_or_whine(pid_t pid, const char *argv0)
{
int status, code = -1;
pid_t waiting;
@@ -432,8 +432,7 @@ fail_pipe:
* At this point we know that fork() succeeded, but execvp()
* failed. Errors have been reported to our stderr.
*/
- wait_or_whine(cmd->pid, cmd->argv[0],
- cmd->silent_exec_failure);
+ wait_or_whine(cmd->pid, cmd->argv[0]);
failed_errno = errno;
cmd->pid = -1;
}
@@ -538,7 +537,7 @@ fail_pipe:
int finish_command(struct child_process *cmd)
{
- return wait_or_whine(cmd->pid, cmd->argv[0], cmd->silent_exec_failure);
+ return wait_or_whine(cmd->pid, cmd->argv[0]);
}
int run_command(struct child_process *cmd)