Joel VanderWerf wrote:
> File.read($path)
I should have pointed out that the File.read call (within the lock
context) is necessary to the problem. I wonder if that gives up the
lock? Because doing the following immediately after the read seems to
fix the problem:
f.flock(File::LOCK_EX)
So this suggests that file locks are nestable on linux but not on
solaris. The man pages say that solaris flock is implemented in terms of
fcntl, so maybe that's where the semantic difference comes from...
I wonder if there is a way ruby can insulate us from this difference?