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

Re: [PATCH] compat/mingw.[ch]: Change return type of exec functions to int

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 6, 2012, 00:42 UTC
Message-ID
<20120406004226.GA2658@burratino>
In-Reply-To
<20120406002454.GB14224@sigill.intra.peff.net>
Jeff King wrote:
Show 21 quoted lines
> I think both (attempt to) document the same thing: that if we get past
> execvp, we know are in error-checking mode. Which is not explicitly said
> anywhere. So maybe:
>
> diff --git a/run-command.c b/run-command.c
> index 7123436..e6ece79 100644
> --- a/run-command.c
> +++ b/run-command.c
> @@ -117,10 +117,12 @@ static int exists_in_PATH(const char *file)
>  
>  int sane_execvp(const char *file, char * const argv[])
>  {
> -	if (!execvp(file, argv))
> -		return 0;
> +	execvp(file, argv);
>  
>  	/*
> +	 * If we are still running, we know an error occurred; let's try to
> +	 * diagnose it more specifically.
> +	 *
>  	 * When a command can't be found because one of the directories
Looks fine to me. :)

Thanks for your patience. Jonathan

Previous: Jeff KingNext: Jeff King
Message 6 of 8 in “compat/mingw.[ch]: Change return type of exec functions to int”
  1. compat/mingw.[ch]: Change return type of exec functions to intRamsay Jones, Apr 5, 2012
  2. Jonathan NiederApr 5, 2012
  3. Jeff KingApr 5, 2012
  4. Jonathan NiederApr 5, 2012
  5. Jeff KingApr 6, 2012
  6. Jonathan NiederApr 6, 2012
  7. Jeff KingApr 6, 2012
  8. Junio C HamanoApr 6, 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.