| delorie.com/archives/browse.cgi | search |
| 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:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=ZI05PVCOlGZiHAuGkWJ2VbVNA1ZXu9eVS05MlU7A6/ro6jxILQAjK | |
| KBRYxHP1Xl4Ep19rwQwI+mvvF5iTA05qrFLgrzzp4n+5JEMSvnSL5SsBoLmv8xY5 | |
| +I/9VwyqyccoFnjk9NaQx6hXcGgaoOBDAuCELr3pgi1cgA3vYmCNuU= | |
| 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=UvG1sPAzvAyZ/hXOjeSuwc+wpN0=; b=et8skQst2HJh6y/iejVBFLWiWHAa | |
| oFQqaJn11my0LtWibsth/uK7xhLypv8Uk+ZTg5ZDvYfWrp6+lKbcEd6ZX2zsckgi | |
| CaV8eE17TvZa4aigXqYRJGvWyEqQtFIBel4G5WdNB5c29/1pEGMBQViiQlkIDqen | |
| OXNieFIxB3PEFAo= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| 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=0.0 required=5.0 tests=AWL,BAYES_50,RDNS_NONE autolearn=no version=3.3.1 |
| Date: | Fri, 19 Jul 2013 12:08:09 +0200 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: sqlite defect |
| Message-ID: | <20130719100809.GD20871@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <trinity-fdc5a0b5-6dcf-4fc0-9370-dd32a75fe928-1373654994500 AT 3capp-gmx-bs47> <51E703FB DOT 1010300 AT etr-usa DOT com> <trinity-1068d666-3dec-43c9-8453-39c7cae3a94c-1374102947415 AT 3capp-gmx-bs33> <51E74AB4 DOT 7010508 AT etr-usa DOT com> <ks87ur$nle$1 AT ger DOT gmane DOT org> <20130718085953 DOT GC9628 AT calimero DOT vinschen DOT de> <ksa6bs$ac9$1 AT ger DOT gmane DOT org> <20130719100329 DOT GC20871 AT calimero DOT vinschen DOT de> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20130719100329.GC20871@calimero.vinschen.de> |
| User-Agent: | Mutt/1.5.21 (2010-09-15) |
On Jul 19 12:03, Corinna Vinschen wrote:
> 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 <stdio.h>
> > #include <fcntl.h>
> > #include <assert.h>
> > #include <string.h>
> > #include <sys/file.h>
> > 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).
...and, btw., fcntl(fd, F_SETOWN) is only supported on sockets.
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |