X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=IK0KVogBzCYo6rPLtpLcKOPXDOtd2AcjZpYBlPEPj9CY2phCv25bC
	sIXTvpI5UGNKfgeb6fJ0vTC16uRuJOoHqQIEOt6W3CPTOdgOeiKwc2ICxC9eZChK
	SlvvgMcRGI1xnykxD28Ak+ILp7Qn7TLwXBCSrszp6Ip/2XUyM3pSPs=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=1xn+STu6HmoxH797mOsKvGt/uwk=; b=H5a8f5WSATL/3vcvxx39C5y56Iu/
	e0QCLyXH1eaBrHhs0oHBdUpc0F8VciZFmZ6pH3zT2YlDONg57llKTGtD2x3EEZ3T
	QM4t9h6wqUZhlUoTrNK4QdWfqyHT73t0WGcucs8X+fa77anL9EkKx/22/VQJwIPw
	eIziR9L4XUwuzQA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,TW_FC autolearn=ham version=3.3.1
Date: Sun, 2 Jun 2013 12:31:25 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: sqlite3: bug with monotone
Message-ID: <20130602103125.GE13934@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <51A6B6EB.6050309@users.sourceforge.net> <loom.20130530T122354-144@post.gmane.org> <51A7862F.1070507@etr-usa.com> <51A7D47E.3050502@users.sourceforge.net> <51A7F547.6020509@etr-usa.com> <20130531092228.GB30659@calimero.vinschen.de> <51A900EF.2020606@etr-usa.com> <20130601105741.GC30659@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20130601105741.GC30659@calimero.vinschen.de>
User-Agent: Mutt/1.5.21 (2010-09-15)

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

