From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24151 invoked by alias); 19 Jul 2013 10:03:38 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 24126 invoked by uid 89); 19 Jul 2013 10:03:37 -0000 X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_50,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 19 Jul 2013 10:03:37 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 3B980520ACB; Fri, 19 Jul 2013 12:03:29 +0200 (CEST) Date: Fri, 19 Jul 2013 10:08:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: sqlite defect Message-ID: <20130719100329.GC20871@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <51E703FB.1010300@etr-usa.com> <51E74AB4.7010508@etr-usa.com> <20130718085953.GC9628@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-07/txt/msg00387.txt.bz2 On Jul 19 10:56, jojelino wrote: > On 2013-07-18 PM 5:59, Corinna Vinschen wrote:> On Jul 18 17:11, > jojelino wrote: > >> On 2013-07-18 AM 10:53, Warren Young wrote: > >>> Nothing so simple. Locking is handled at the OS and/or Cygwin DLL > >>> level. The build change between 3.7.16.2 and 3.7.17-3 is that > we're now > >>> relying on new features in the Cygwin DLL to do Windows-style > locking by > >>> default. > >>> > >>> Older versions of Cygwin SQLite bypassed the Cygwin DLL entirely for > >>> this, going straight to the Win32 API, thereby preventing the DLL from > >>> interposing itself for the "posix" case. > >>> > >> Mandatory locking feature of cygwin used in sqlite is broken. > > > > Simple testcase in plain C? Thanks, but... > #include > #include > #include > #include > #include > int > main() > { > int fd = open("asdf.txt", O_BINARY | O_RDWR | O_NOINHERIT | O_CREAT); > const char* buf = > "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\0"; > int i=0; > write(fd, buf, strlen(buf)); > fcntl(fd,F_LCK_MANDATORY,0); > assert(flock(fd,F_SETOWN)==0); ^^^^^^^^ F_SETOWN is no valid flag for flock(2). 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