public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Options for getting mandatory locking in cygwin1.dll (was: Promote sqlite 3.7.13-1 from test status?)
Date: Fri, 17 Aug 2012 09:45:00 -0000	[thread overview]
Message-ID: <20120817093737.GB26407@calimero.vinschen.de> (raw)
In-Reply-To: <502D4F2F.5080306@etr-usa.com>

On Aug 16 13:51, Warren Young wrote:
> On 8/16/2012 6:26 AM, Corinna Vinschen wrote:
> >On Aug 16 06:01, Warren Young wrote:
> >>Advisory locking only works when all players cooperate.  We can't
> >>assume that on Windows, unless we set up an insular Cygwin ghetto.
> >
> >So, are you saying that Cygwin should use mandatory file locking?
> 
> Of course not.  That would be a disaster.
> 
> >You are aware that there's no chance at all to implement the UNIX
> >locking API calls correctly this way since Windows locking has nothing
> >in common with UNIX locking except for the word "locking".
> 
> Not even on a per-process basis (cygwin_set_mandatory_locking(1)),
> in conjunction with fcntl(F_SETLK)?  That's how SQLite's
> unixFileLock() function is implemented.
> 
> That is, this proposal would put the DLL in a mode where it called
> LockFileEx() to establish the reader/writer lock byte ranges instead
> of using its private advisory locking scheme.
> 
> Alternately, Cygwin could follow Linux and implement 'mount -o
> mand'. You could get mandatory locking on just your svn checkout
> tree this way, for example.  It would apply to all Cygwin programs,
> not just svn/SQLite, but it shouldn't be any more problematic than
> normal day to day Windows use.  Cygwin programs not run within that
> mount wouldn't be affected.

A "mand" mount option sounds like a really interesting idea, together
with the special group permission settings as described in the Linux
fcntl(2) man page.  Maybe we can even relax that by making the "mand"
option the default setting, so the correct file permissions would be
the only requirement by default.  Ok, this also requires to use a
filesystem with real file permissions, so FAT or "noacl" mounted
filesystems are out of th question, but I can live with that just fine.

The problem with this approach is a non-technical one:  In the next
couple of months I have probably no time to implement it.  It's not
overly tricky to implement it, as far as I can see, but, as usual,
somebody has to do it.  So if anybody would like to take a stab at
it...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          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

  reply	other threads:[~2012-08-17  9:38 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 17:20 [ANNOUNCEMENT] Updated: sqlite3-3.7.13-1 Warren Young
2012-08-16  3:38 ` Promote sqlite 3.7.13-1 from test status? (was: Updated: sqlite3-3.7.13-1) Warren Young
2012-08-16  4:56   ` Promote sqlite 3.7.13-1 from test status? Larry Hall (Cygwin)
2012-08-16  9:01   ` Promote sqlite 3.7.13-1 from test status? (was: Updated: sqlite3-3.7.13-1) Achim Gratz
2012-08-16  9:03     ` Corinna Vinschen
2012-08-16 11:06       ` Promote sqlite 3.7.13-1 from test status? Warren Young
2012-08-16 11:39         ` Corinna Vinschen
2012-08-16 12:48           ` Warren Young
2012-08-16 13:32             ` Corinna Vinschen
2012-08-16 14:32               ` Earnie Boyd
2012-08-16 16:20               ` Warren Young
2012-08-16 17:46                 ` Brian Wilson
2012-08-16 18:15                   ` David Rothenberger
2012-08-16 18:37                   ` Warren Young
2012-08-16 22:29                     ` James Johnston
2012-08-17  3:52                       ` Yaakov (Cygwin/X)
2012-08-17  3:56                         ` David Rothenberger
2012-08-17 20:03                         ` Brian Wilson
2013-02-05 19:51                         ` Achim Gratz
2013-02-11 20:07                           ` Warren Young
2013-02-11 21:24                             ` Achim Gratz
2013-02-11 21:51                               ` Warren Young
2013-02-11 22:00                                 ` Achim Gratz
2013-02-12  6:26                                   ` Warren Young
2013-02-12 17:54                                     ` Achim Gratz
2013-03-01 15:12                                     ` Achim Gratz
2013-03-01 22:52                                       ` Warren Young
2013-03-02  7:53                                         ` Achim Gratz
2013-02-11 22:49                                 ` David Stacey
2012-08-17 19:49                       ` Brian Wilson
2012-08-17  1:40                     ` JonY
2012-08-16 20:41               ` Options for getting mandatory locking in cygwin1.dll (was: Promote sqlite 3.7.13-1 from test status?) Warren Young
2012-08-17  9:45                 ` Corinna Vinschen [this message]
2012-08-17 14:25                   ` Andrey Repin
2012-08-17 15:52                   ` Options for getting mandatory locking in cygwin1.dll Warren Young
2012-08-16 15:06             ` Promote sqlite 3.7.13-1 from test status? Thrall, Bryan
2012-08-17  9:09             ` Andrey Repin
2012-11-17  5:15     ` Daniel Colascione
2012-08-16  9:04   ` Promote sqlite 3.7.13-1 from test status? (was: Updated: sqlite3-3.7.13-1) Adam Dinwoodie
2012-11-20 12:51 ` [ANNOUNCEMENT] Updated: sqlite3-3.7.13-1 Yaakov (Cygwin/X)
2012-11-21 18:43   ` Warren Young
2012-11-21 19:02     ` Achim Gratz
2012-11-23 22:13       ` Jon Lambert
2013-01-08 21:31       ` sqlite3-3.7.15.1-1 packages to test Warren Young
2013-01-08 21:36         ` Achim Gratz
2013-01-09 22:28         ` David Stacey
2013-01-10  0:08           ` Warren Young
2013-01-20  9:23         ` David Stacey
2013-01-20 10:45           ` Achim Gratz
2013-01-20 13:01             ` David Stacey
2013-02-06 22:44               ` David Stacey
2013-02-11 20:14                 ` Warren Young
2013-02-11 22:23                   ` David Stacey
2012-11-21 19:04     ` [ANNOUNCEMENT] Updated: sqlite3-3.7.13-1 Christopher Faylor
2012-11-21 19:40     ` David Stacey
2012-11-22 16:43       ` Christopher Faylor
     [not found] <CAJtt6BgReBuo=EBfujsLHB+xLW1E_POsdOayDfM_RtyuWRpJbg@mail.gmail.com>
2012-08-31 19:12 ` Fwd: Options for getting mandatory locking in cygwin1.dll (was: Promote sqlite 3.7.13-1 from test status?) Terris Linenbach
2012-09-02 10:59   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120817093737.GB26407@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).