Re: flock, fcntl, lockf?



On 01/14/2008 09:34 AM, Hendrik Boom wrote:
What's the right way these days to lock a file (or possibly a part of a
file) to prevent damage from simultaneous writing?

I suppose the answer could be, "depends on what you want to do.." I think that flock() does not work on NFS mounts, if that is any consideration.

--
Kind Regards,
Michael Shuler


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: flock, fcntl, lockf?
    ... file) to prevent damage from simultaneous writing? ... think that flock() does not work on NFS mounts, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: unable to install nfs-kernel-server
    ... nfs mounts on other Unices or Linux distros. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: looking for the lockfile program
    ... or has been obsoleted for some reason. ... I'm not looking for lockfile_create or friends, nor flock, but the ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: distributions: UBUNTU vs DEBIAN
    ... Might I suggest a filter? ... Or maybe just pressing delete? ... mildly ironic that people who flock to a distribution supposedly for it's ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: Rogue Directory
    ... few NFS mounts on it. ... As root, I typed "mkdir /thresh" and it worked, ... some odd permissions - e.g.: ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)