X-Git-Url: http://git.samba.org/samba.git/?p=rsync.git;a=blobdiff_plain;f=connection.c;h=ec726075fe44a58278d0110beea5ef94a39dd01c;hp=1025c8fc615b8817b4685b06306d52e027cca816;hb=cc637fcc5136e5fa9d2f1593247760c0ac6eb597;hpb=31593dd6106cfef78fc88cbe9c831a51f00a4aa6 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; }