X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/bcf5b1335d6e5183f9545eb1b23e16185264e311..8d72ef6e5258fe6a3174db822e5a6b1f7a32e252:/connection.c diff --git a/connection.c b/connection.c index 1025c8fc..ec726075 100644 --- 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; }