]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Fix unlocking. It doesn't really matter, since the locks are released before
authormmj <none@none>
Thu, 13 Jan 2005 19:29:39 +0000 (06:29 +1100)
committermmj <none@none>
Thu, 13 Jan 2005 19:29:39 +0000 (06:29 +1100)
this call, or will be shortly after due to a close(fd);

src/mylocking.c

index 9237d1f0c982cdbcba5582485bc5f2527c105b17..3e2089643215da3b3e3408e81845bb06419b84fa 100644 (file)
@@ -49,6 +49,9 @@ int myunlock(int fd)
        struct flock locktype;
 
        locktype.l_type = F_UNLCK;
+       locktype.l_whence = SEEK_SET;
+       locktype.l_start = 0;
+       locktype.l_len = 0;
        do {
                myunlock = fcntl(fd, F_SETLKW, &locktype);
        } while(myunlock < 0 && errno == EINTR);