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

Re: using git directory cache code in darcs?

From
PJPaul Jackson <pj@sgi.com>
Date
Apr 18, 2005, 02:00 UTC
Message-ID
<20050417190001.7e1ae3ac.pj@sgi.com>
In-Reply-To
<7vvf6lugw7.fsf@assigned-by-dhcp.cox.net>
Junio wrote:
> What Linus is saying is that he wants you to talk with git
> plumbing by invoking the executables he have, via system(3),
> popen(3), etc.

Hopefully, Linus didn't specify system(3) or popen(3) for production software.

They are a rich source of security holes. Inefficient, too, since they invoke a shell process to interpret the command.

Use execve(2), or exevl(3), execle(3), execv(3).

Or if you really enjoy the path search, use execlp or execvp, but with your own $PATH, not trusting the one passed in via the environment any further than you can throw it.

However, on further consideration, I think Linus is wrong to recommend that the git executables, not a libgit library, be the 'basic user level on which all else is based."

I will reply to a Linus post, expounding on that thought further.
-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@engr.sgi.com> 1.650.933.1373, 1.925.600.0401
Previous: Junio C HamanoNext: Paul Jackson
Message 10 of 14 in “using git directory cache code in darcs?”
  1. David RoundyApr 16, 2005
  2. Ingo MolnarApr 16, 2005
  3. Junio C HamanoApr 16, 2005
  4. Linus TorvaldsApr 16, 2005
  5. David RoundyApr 17, 2005
  6. Linus TorvaldsApr 17, 2005
  7. Mike TahtApr 17, 2005
  8. Nomad ArtonApr 17, 2005
  9. Junio C HamanoApr 17, 2005
  10. Paul JacksonApr 18, 2005
  11. Paul JacksonApr 18, 2005
  12. Linus TorvaldsApr 18, 2005
  13. Paul JacksonApr 18, 2005
  14. git optionsMike Taht, Apr 18, 2005

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.