Skip to content

Commit 1327452

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f07e555 commit 1327452

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

run-command.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static inline void set_cloexec(int fd)
226226
fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
227227
}
228228

229-
static int wait_or_whine(pid_t pid, const char *argv0, int silent_exec_failure)
229+
static int wait_or_whine(pid_t pid, const char *argv0)
230230
{
231231
int status, code = -1;
232232
pid_t waiting;
@@ -432,8 +432,7 @@ int start_command(struct child_process *cmd)
432432
* At this point we know that fork() succeeded, but execvp()
433433
* failed. Errors have been reported to our stderr.
434434
*/
435-
wait_or_whine(cmd->pid, cmd->argv[0],
436-
cmd->silent_exec_failure);
435+
wait_or_whine(cmd->pid, cmd->argv[0]);
437436
failed_errno = errno;
438437
cmd->pid = -1;
439438
}
@@ -538,7 +537,7 @@ int start_command(struct child_process *cmd)
538537

539538
int finish_command(struct child_process *cmd)
540539
{
541-
return wait_or_whine(cmd->pid, cmd->argv[0], cmd->silent_exec_failure);
540+
return wait_or_whine(cmd->pid, cmd->argv[0]);
542541
}
543542

544543
int run_command(struct child_process *cmd)

0 commit comments

Comments
 (0)