This is the mail archive of the
cygwin
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: Sun, 2 Jun 2013 12:31:25 +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
Hi Warren,
On Jun 1 12:57, Corinna Vinschen wrote:
> If F_MDLCK is not such a bright idea, maybe another fcntl is? Something
> along these lines:
>
> fd = open ("my.db", ...);
> #ifdef __CYGWIN__
> fcntl (fd, F_SETLK_MAND, 1);
> #endif
>
> As for the user, we could add the g+S,g-x stuff additionally at one point,
> but I'm rather reluctant to provide these means at all. See below.
> [...]
> 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. [...]
I just applied a patch to implement mandatory locking. It also supports
F_GETLK, with limited usability due to Windows restrictions, as I
explained in other mail. It does NOT yet support BSD flock locking,
only POSIX fcntl locking.
I dropped the F_MDLCK idea. Instead I implemented a specific fcntl code
to switch to mandatory locking on a file descriptor:
fcntl (fd, F_LCK_MANDATORY, 1);
The name F_SETLK_MAND didn't seem right. Anyway, afterwards, you can
use the usual locking fcntls, but with Windows mandatory locking
semantics.
I didn't add a way for the user to switch on mandatory locking for now,
and I don't intend to do that for 1.7.19. Hope that helps, nevertheless.
I'm just about to generate a 2013-06-02 developer snapshot for 32 bit,
a 64 bit DLL will follow tomorrow.
Please give the 32 bit snapshot a try ASAP. I intend to release 1.7.19
very soon, probably tomorrow or Tuesday.
Thanks,
Corinna
--
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