This is the mail archive of the
mailing list for the Cygwin project.
Re: sqlite3: bug with monotone
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 1 Jun 2013 13:35:31 +0200
- Subject: Re: sqlite3: bug with monotone
- References: <51A6B6EB dot 6050309 at users dot sourceforge dot net> <loom dot 20130530T122354-144 at post dot gmane dot org> <51A7862F dot 1070507 at etr-usa dot com> <51A7D47E dot 3050502 at users dot sourceforge dot net> <51A7F547 dot 6020509 at etr-usa dot com> <20130531092228 dot GB30659 at calimero dot vinschen dot de> <51A900EF dot 2020606 at etr-usa dot com> <20130601105741 dot GC30659 at calimero dot vinschen dot de>
- Reply-to: cygwin at cygwin dot com
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
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple