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

Re: use result of open(2) to check for presence

From
MWMorten Welinder <mwelinder@gmail.com>
Date
Jan 5, 2006, 14:48 UTC
Message-ID
<118833cc0601050648t17f68bcch8fd7c541585e965c@mail.gmail.com>
In-Reply-To
<81b0412b0601050343w4c00ac86y30569c3babbf6728@mail.gmail.com>

Neat, but perhaps you should check the fstat return code. It actually can fail, for example if the filesize cannot be represented in the structure because it is too big.

Morten
Previous: Alex RiesenNext: Alex Riesen
Message 2 of 5 in “use result of open(2) to check for presence”
  1. Alex RiesenJan 5, 2006
  2. Morten WelinderJan 5, 2006
  3. Alex RiesenJan 5, 2006
  4. Morten WelinderJan 5, 2006
  5. Alex RiesenJan 5, 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.