-
Werner Koch authored
flock as a couple of problems. For example it does not work reliable on remote file systems. In particular not with CIFS. It does also not work with FAT systems (i.e. vfat). A solution to this is to use a separate lock file and either use hardlinks or open(O_EXCL) to check for the existence of this file. For details see the remarks in dotlock.c. The implementation uses a portable implementation named dotlock.c which is in its basic form in use for more than a decade. It was recently enhanced to properly detect file systems without hardlink support and then fallback to a O_EXCL style locking. It has been tested on ext3, ufs, nfs, cifs and on vfat. To keep the changes simple the implementation creates and locks immediately and does not separate lock file template creation from actual locking. This can be improved by either using hacks in dotlock.c to re-use existing lock file templates or by integrating it closer into the gnome2-store. https://bugzilla.gnome.org/show_bug.cgi?id=657234
9e777720