This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sqlite3: bug with monotone


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]