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:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; q=dns; s=default; b=cZPa54wEJXUrQeynWLk/+Vzr+glL7g GEmjeAj2h2cP6np3oZs/RBxTHaycROEKbKZNRkzzHqDvHRa+1r1w+Aawn7eXsf4C VvZyTXHL9NyMV9o1DZixLTcgc+hV1yvY5Ylhj35cSn/hgLGo5IrIZ7H9HSvogH+b SXNV6WMniThrw= 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:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; s=default; bh=1N+hDqmi+PD1G8mpQ5cjY1ma1dw=; b=svoC xsWnWUmUmAog/qNT72GZQ3O7ZFOuTOTwDGFNmrEujKcxJ24ijB5ivlPEOc0PeGeZ fYYZ2D3fbtZXC8CYhvp5apHNmdpCphQbPooGwmRrr/ZwpTHuM75Yq3Rs+aF0T1Qf YAfgU9JlIfThucTpQqfGlRVncZvGvXzs513WGiM= 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=1.4 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,FSL_HELO_BARE_IP_2,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_NUMERIC_HELO,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 To: cygwin AT cygwin DOT com From: jojelino Subject: Re: sqlite defect Date: Fri, 19 Jul 2013 10:56:16 +0900 Lines: 50 Message-ID: References: <51E703FB DOT 1010300 AT etr-usa DOT com> <51E74AB4 DOT 7010508 AT etr-usa DOT com> <20130718085953 DOT GC9628 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:25.0) Gecko/20100101 Thunderbird/25.0a1 In-Reply-To: <20130718085953.GC9628@calimero.vinschen.de> 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? > > > Corinna > #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); assert(flock(fd,F_SETOWN)==0); assert(flock(fd,LOCK_NB|LOCK_UN)==0); fcntl(fd,F_LCK_MANDATORY,1); assert(flock(fd,F_SETOWN)==0); assert(flock(fd,LOCK_NB|LOCK_UN)==0); assert(flock(fd,F_SETOWN)==0); assert(flock(fd,F_SETOWN)==0); /* assertion "flock(fd,F_SETOWN)==0" failed: file "f_lck.c", line 28, function: main */ return 0; } /**/ -- Regards. -- 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