Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Mention --min-size/--max-size changes.
[rsync/rsync.git]
/
connection.c
diff --git
a/connection.c
b/connection.c
index
1025c8f
..
ec72607
100644
(file)
--- a/
connection.c
+++ b/
connection.c
@@
-29,7
+29,7
@@
int claim_connection(char *fname,int max_connections)
if (max_connections <= 0)
return 1;
-
+
fd = open(fname,O_RDWR|O_CREAT, 0600);
if (fd == -1) {
@@
-41,6
+41,9
@@
int claim_connection(char *fname,int max_connections)
if (lock_range(fd, i*4, 4)) return 1;
}
+ /* only interested in open failures */
+ errno = 0;
+
close(fd);
return 0;
}