summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 28ffb89)
raw | patch | inline | side by side (parent: 28ffb89)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 5 Nov 2005 19:02:56 +0000 (11:02 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 5 Nov 2005 19:02:56 +0000 (11:02 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
copy.c | patch | blob | history |
index 20092757d395dfa4af99a6062e5e2cc0fa5e00c3..e1cd5d06503d93f6b400a3911e6b61ff327190ca 100644 (file)
--- a/copy.c
+++ b/copy.c
if (!len)
break;
if (len < 0) {
+ int read_error;
if (errno == EAGAIN)
continue;
+ read_error = errno;
+ close(ifd);
return error("copy-fd: read returned %s",
- strerror(errno));
+ strerror(read_error));
}
while (1) {
int written = write(ofd, buf, len);