git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/5] run-command: drop silent_exec_failure arg from wait_or_whine

From
Jeff King <peff@peff.net>
Date
Nov 30, 2012, 22:40 UTC
Message-ID
<20121130224050.GA23772@sigill.intra.peff.net>
In-Reply-To
<20121130223943.GA27120@sigill.intra.peff.net>

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>
---
 run-command.c | 7 +++----
 1 file 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 @@ int finish_command(struct child_process *cmd)
 
 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)
-- 
1.8.0.1.620.g558b0aa
Previous: Jeff KingNext: Jeff King
Message 2 of 9 in “ignore SIG{INT,QUIT} when launching editor”
  1. 0/5 ignore SIG{INT,QUIT} when launching editorJeff King, Nov 30, 2012
  2. 1/5 run-command: drop silent_exec_failure arg from wait_or_whineJeff King, Nov 30, 2012
  3. 2/5 launch_editor: refactor to use start/finish_commandJeff King, Nov 30, 2012
  4. 3/5 launch_editor: ignore terminal signals while editor has controlJeff King, Nov 30, 2012
  5. 4/5 run-command: do not warn about child death from terminalJeff King, Nov 30, 2012
  6. 5/5 launch_editor: propagate signals from editor to gitJeff King, Nov 30, 2012
  7. Krzysztof MazurDec 1, 2012
  8. Paul FoxDec 1, 2012
  9. Junio C HamanoDec 2, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.