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

[PATCH 0/2] open() error checking

From
Thomas Rast <trast@inf.ethz.ch>
Date
Jul 12, 2013, 08:58 UTC
Message-ID
<cover.1373618940.git.trast@inf.ethz.ch>

#1 is Dale's suggested change. Dale, to include it we'd need your Signed-off-by as per Documentation/SubmittingPatches.

#2 is a similar error-checking fix; I reviewed 'git grep "\bopen\b"' and found one case where the return value was obviously not tested. The corresponding Windows code path has the same problem, but I dare not touch it; perhaps someone from the Windows side can look into it?

I originally had a four-patch series to open 0/1/2 from /dev/null, but then I noticed that this was shot down in 2008:

  http://thread.gmane.org/gmane.comp.version-control.git/93605/focus=93896
Do you want to resurrect this?

The worst part about it is that because we don't have a stderr to rely on, we can't simply die("stop playing mind games").

Dale R. Worley (1):
  git_mkstemps: correctly test return value of open()
Thomas Rast (1):
  run-command: dup_devnull(): guard against syscalls failing
 run-command.c | 5 ++++-
 wrapper.c     | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
-- 
1.8.3.2.998.g1d087bc
Next: Thomas Rast
Message 1 of 16 in “open() error checking”
  1. 0/2 open() error checkingThomas Rast, Jul 12, 2013
  2. 1/2 git_mkstemps: correctly test return value of open()Thomas Rast, Jul 12, 2013
  3. Thomas RastJul 16, 2013
  4. Junio C HamanoJul 17, 2013
  5. Drew NorthupJul 18, 2013
  6. Junio C HamanoJul 18, 2013
  7. Junio C HamanoJul 18, 2013
  8. Dale R. WorleyJul 18, 2013
  9. Eric SunshineJul 18, 2013
  10. Junio C HamanoJul 18, 2013
  11. Dale R. WorleyJul 18, 2013
  12. Junio C HamanoJul 18, 2013
  13. Dale R. WorleyJul 18, 2013
  14. 2/2 run-command: dup_devnull(): guard against syscalls failingThomas Rast, Jul 12, 2013
  15. Junio C HamanoJul 12, 2013
  16. Thomas RastJul 16, 2013

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.