Skip to content

open() error checking

Thomas Rast git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2git_mkstemps: correctly test return value of open()wrapper.c+1 -111 replies
1/2daemon/shell: refactor redirection of 0/1/2 from /dev/nullcache.h daemon.c setup.c +1 more+17 -210 replies
2/2run-command: dup_devnull(): guard against syscalls failingrun-command.c+4 -10 replies
2/2git: ensure 0/1/2 are open in main()git.c+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] open() error checking

#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(-)
Signature · 1 line
1.8.3.2.998.g1d087bc