Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd6f31f
)
Made read_arg_from_pipe() handle EINTR.
author
Wayne Davison
<wayned@samba.org>
Thu, 3 Jan 2008 01:20:44 +0000
(17:20 -0800)
committer
Wayne Davison
<wayned@samba.org>
Thu, 3 Jan 2008 01:20:44 +0000
(17:20 -0800)
clientserver.c
patch
|
blob
|
blame
|
history
diff --git
a/clientserver.c
b/clientserver.c
index
cb17438
..
1e3af63
100644
(file)
--- a/
clientserver.c
+++ b/
clientserver.c
@@
-355,8
+355,12
@@
static int read_arg_from_pipe(int fd, char *buf, int limit)
char *bp = buf, *eob = buf + limit - 1;
while (1) {
- if (read(fd, bp, 1) != 1)
+ int got = read(fd, bp, 1);
+ if (got != 1) {
+ if (got < 0 && errno == EINTR)
+ continue;
return -1;
+ }
if (*bp == '\0')
break;
if (bp < eob)