[Mono-dev] Equivalent to LockFileEx on Linux

Avery Pennarun apenwarr at gmail.com
Tue Mar 2 21:03:19 EST 2010


On Tue, Mar 2, 2010 at 4:28 PM, Jonathan Pryor <jonpryor at vt.edu> wrote:
> On Tue, 2010-03-02 at 12:29 -0800, Daniel Morgan wrote:
>> Is there an equivalent to LockFileEx on Linux?  What would it be?
>
> No.  There's flock(2) and fcntl(2), but these are advisory in nature
> only.  (Meaning that any other process with access rights to the file
> can come along, ignore the advisory lock, and change the file underneath
> you.)

Probably the question needs to be rephrased a little.  sqlite itself
obviously works fine on Linux, so clearly Linux has the kind of
locking that is needed in order to make sqlite work... even if it's in
Linux.  Whether silverlight/moonlight expose such things (without
DllImport) is another question.

Avery


More information about the Mono-devel-list mailing list