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

Re: [PATCH 2/2] git: continue alias lookup on EACCES errors

From
Frans Klaver <fransklaver@gmail.com>
Date
Mar 29, 2012, 17:21 UTC
Message-ID
<op.wbxzunjh0aolir@keputer>
In-Reply-To
<20120329171525.GB12318@sigill.intra.peff.net>
On Thu, 29 Mar 2012 19:15:25 +0200, Jeff King <peff@peff.net> wrote:
Show 20 quoted lines
> On Thu, Mar 29, 2012 at 01:16:47PM +0200, Frans Klaver wrote:
>
>> > Yes, we can differentiate after the fact. Though I think it ends up
>> > being almost the same code as just implementing execvp in the first
>> > place.
>>
>> It will, but doesn't stock execv*() also provide access to shell
>> builtins? If that's the case then I wouldn't be bothered by the extra
>> bit of code we need to understand what execvp has been doing. I think
>> it would be sane to keep sane_execvp a wrapper instead of a
>> reimplementation.
>
> No, definitely not. Handling builtins is the responsibility of the
> shell, not of execvp. It is responsible for falling back to "/bin/sh
> $file" if execve returns ENOEXEC.
>
> Anyway, I think the last round I posted is good enough. It is
> approaching execvp in complexity, but it is still a little bit simpler.
> And because it's on the error code path, if we are incompatible the
> worst thing we can screw up is the error message, not the actual exec.
Good. In that case I think this last looks good, indeed.
Frans
Previous: Jeff KingNext: Johannes Sixt
Message 42 of 47 in “Bug? Bad permissions in $PATH breaks Git aliases”
  1. James PickensMar 26, 2012
  2. Jeff KingMar 27, 2012
  3. James PickensMar 27, 2012
  4. Junio C HamanoMar 27, 2012
  5. Jeff KingMar 27, 2012
  6. 1/2 run-command: propagate EACCES errors to parentJeff King, Mar 27, 2012
  7. Junio C HamanoMar 27, 2012
  8. Jeff KingMar 27, 2012
  9. 2/2 git: continue alias lookup on EACCES errorsJeff King, Mar 27, 2012
  10. Junio C HamanoMar 27, 2012
  11. Jeff KingMar 28, 2012
  12. Junio C HamanoMar 28, 2012
  13. Jeff KingMar 28, 2012
  14. Jonathan NiederMar 28, 2012
  15. Junio C HamanoMar 28, 2012
  16. Jonathan NiederMar 28, 2012
  17. Jeff KingMar 28, 2012
  18. Jonathan NiederMar 28, 2012
  19. Jeff KingMar 28, 2012
  20. Jeff KingMar 28, 2012
  21. Jonathan NiederMar 28, 2012
  22. Jeff KingMar 28, 2012
  23. Jonathan NiederMar 28, 2012
  24. Jeff KingMar 28, 2012
  25. Jonathan NiederMar 28, 2012
  26. Jeff KingMar 28, 2012
  27. Frans KlaverMar 28, 2012
  28. Junio C HamanoMar 28, 2012
  29. Jeff KingMar 28, 2012
  30. Junio C HamanoMar 28, 2012
  31. Jeff KingMar 28, 2012
  32. Jeff KingMar 28, 2012
  33. Junio C HamanoMar 28, 2012
  34. Frans KlaverMar 29, 2012
  35. Jeff KingMar 29, 2012
  36. Frans KlaverMar 29, 2012
  37. Jeff KingMar 28, 2012
  38. Junio C HamanoMar 28, 2012
  39. Jeff KingMar 28, 2012
  40. Frans KlaverMar 29, 2012
  41. Jeff KingMar 29, 2012
  42. Frans KlaverMar 29, 2012
  43. Johannes SixtMar 27, 2012
  44. James PickensMar 27, 2012
  45. Junio C HamanoMar 27, 2012
  46. James PickensMar 27, 2012
  47. Junio C HamanoMar 27, 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.