On Sat, 30 Oct 2010 00:18:15 +0200, Seth Grover <sethdgro...@gmail.com> wrote:

My question is this: if FileOpen automagically handles the file
locking through a call to DoFileLocking, wouldn't it be more correct
for FileClose handle unlocking as well?

It should, if it's necessary.

Interestingly

"man 2 flock" says:

|Furthermore, the lock is released either by an explicit LOCK_UN operation on
|any of these duplicate descriptors, or when all such descriptors have been
|closed.

So I would expect the lock to disappear when the file is closed. Nitpicking
people might say, this only applies to duplicated descriptors, but then
what's the point?

So, actually I'm inclined to consider that a bug in the underlying OS.


Vinzent.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to