Code

short i/o: fix calls to read to use xread or read_in_full
authorAndy Whitcroft <apw@shadowen.org>
Mon, 8 Jan 2007 15:58:08 +0000 (15:58 +0000)
committerJunio C Hamano <junkio@cox.net>
Mon, 8 Jan 2007 23:44:47 +0000 (15:44 -0800)
commit93d26e4cb9cec2eb8abb4f37e6dda2c86fcceeac
tree8d3cda91ddd8242531995cb304f37578bfaa7cf0
parente08140568a131bcd26e64a0bc8188040847be998
short i/o: fix calls to read to use xread or read_in_full

We have a number of badly checked read() calls.  Often we are
expecting read() to read exactly the size we requested or fail, this
fails to handle interrupts or short reads.  Add a read_in_full()
providing those semantics.  Otherwise we at a minimum need to check
for EINTR and EAGAIN, where this is appropriate use xread().

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
17 files changed:
builtin-grep.c
builtin-tar-tree.c
builtin-upload-archive.c
cache.h
dir.c
http-fetch.c
http-push.c
imap-send.c
index-pack.c
local-fetch.c
path.c
refs.c
sha1_file.c
ssh-fetch.c
ssh-upload.c
upload-pack.c
write_or_die.c