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

Re: open(2) vs fopen(3)

From
Andy Whitcroft <apw@shadowen.org>
Date
Sep 14, 2006, 10:52 UTC
Message-ID
<4509348B.3060907@shadowen.org>
In-Reply-To
<20060914091513.19826.qmail@web25812.mail.ukl.yahoo.com>
moreau francis wrote:
Show 5 quoted lines
> Hi GIT folks,
> 
> I'm reading git source code and falling on this stupid question:
> Why sometime open(2) is used and other time fopen(3) is
> prefered. I'm sorry for this dump question but I have no clue.

It looks very much from a quick random sampling, that open is used where we are going to mmap the file for quick access. fopen otherwise.

-apw
Previous: moreau francisNext: Linus Torvalds
Message 2 of 5 in “open(2) vs fopen(3)”
  1. moreau francisSep 14, 2006
  2. Andy WhitcroftSep 14, 2006
  3. Linus TorvaldsSep 14, 2006
  4. Junio C HamanoSep 14, 2006
  5. Linus TorvaldsSep 14, 2006

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.