sqlite3: bug with monotone

Corinna Vinschen corinna-cygwin@cygwin.com
Sat Jun 1 11:35:00 GMT 2013

On Jun  1 12:57, Corinna Vinschen wrote:
> There's a lot to recommend not using mandatory locking at all, unless in
> very limited circumstances where interoperability with native
> applications using mandatory locking is required.  For one thing, this
> doesn't occur very often, since mandatory record locking isn't used
> a lot, not even on Windows.  But what's more important is that Windows
> mandatory record locking works not as the user can usually expect from
> fcntl or flock: Windows locks are per-process/per-handle.  Locks are not

Make that "per-process/per-file object".

To clarify: The file object is the OS datastructure the handles refer
to.  A duplicated handle refers to the same file object, while a handle
to the same file created with CreateFile refers to another file object.

Duplicated handles within the same process share the locks.  Different
handles to the same file created with CreateFile don't share the locks.

Duplicated handles to the same file object in another process (via
inheritance or an explicit DuplicateHandle) don't share the locks.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

More information about the Cygwin mailing list