X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/31593dd6106cfef78fc88cbe9c831a51f00a4aa6..d5c973ccb7da1bc87c5caa5d5ac594bc217016f7:/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; }