X-Recipient: archive-cygwin AT delorie DOT 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=WviSXT0EMbVdk36v+bEDjMNGhWBdbTAq81ablI/8pKa +FZgKuKad5VFm2H3ZwTyN/FvWVIC8HvqYumUv6YMA97wCmdNaV+gQ/CD+EXIDQbm dR/jIg1/uTHA7CWWtzhtKxqWt3YOdNIdORsxD3/vW+xBitBFvM4ifow3jc1cx2/I = 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=EY4p7yNukiVsY6CwgNzDegia+UI=; b=eyY1LGS1vsYsGG/4Q FWiR5Hi7fnaRUGxvaQczEjnMT2xYc5LLGfNTYcIvh3KkbXm3SZCnyOMAY8KKASbl Oo+VktjnuheeG4xzsJZ22kIw3XaK7iinkD/W+vrJzQJv+fwTUzFV7H38bJkSHaSj fURZGWHnr+zOjHKuHYw3iZ1veg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD,TW_FC autolearn=ham version=3.3.1 Message-ID: <51ACD415.2090709@etr-usa.com> Date: Mon, 03 Jun 2013 11:36:21 -0600 From: Warren Young User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: sqlite3: bug with monotone References: <51A6B6EB DOT 6050309 AT users DOT sourceforge DOT net> <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> <20130602103125 DOT GE13934 AT calimero DOT vinschen DOT de> In-Reply-To: <20130602103125.GE13934@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/2/2013 04:31, Corinna Vinschen wrote: > > I just applied a patch to implement mandatory locking. Thank you! > It also supports > F_GETLK, with limited usability due to Windows restrictions, as I > explained in other mail. It is what it is. A haiku: Yesterday it worked. Today it is not working. Windows is like that. > 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); Could you add an O_MAND open(2) option as well to turn on the same feature? This will avoid a race condition. I apologize for not thinking of this earlier. It just occurred to me as I was working on the SQLite patch to make use of this new feature. > 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 *think* it's sufficient. I may think differently later. :) My current plan is that Cygwin SQLite will build in "Unix mode" now, but with the build flag Yaakov requested above, and mandatory locking enabled unless an environment variable is set. This will let those in Achim's camp use the official Cygwin SQLite but ask it to run in pure POSIX mode. A test build will appear later today. > Please give the 32 bit snapshot a try ASAP. As I see it, the test will proceed in several stages: 0. I patch SQLite and run it against both .18 and your snapshot, and strace it to verify that fcntl(fd, 0x99, 1) is called and returns 0 with the snapshot and returns -1 with errno == EINVAL for .18. Both count as "success" so we don't have to require .19. 1. I upload it, and Achim and Yaakov try it and see if this new build satisfies their use cases. 2. I promote test to curr -- waiting for .19 to hit the mirrors if Achim and Yaakov get back to me before that -- and wait for screams from the users. 3. A month or two hence, I'll tell upstream about the patch, and hope they adopt it. -- 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