Newbie [PHP] here.
I interpret the fine print at
http://us2.php.net/manual/en/function.flock.php
to mean that flock() does not work where the file being locked is
on an NFS filesystem.
The commentary following the "official" description of flock()
offers numerous circumventions broken flock() where the file
needing atomic access is on an NFS filesystem.
One comment offers a PHP function that creates a temporary file in
the same directory (and on the NFS filesystem) as the target of
the write with some code for ifexists to assure concurrency. Then
another poster says that fopen() is not atomic, that mkdir() is
atomic.
There is much discussion of process interruption while holding the
lockfile in these functions where to concequence of the
interruption is a blocked site. The discussion continues with how
to detect an interrupted process and recovery via detecting
filetimes on the lockfile.
Do any of these actually work? What's the truth?
--
The name, "Rex Karz" is a pseudonym. The From: email address
is a spam trap. Messages sent to that address may cause the
sender's IP-address to be listed in one or more DNSBls.