public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Terris Linenbach <cygwin@terris.com>
To: cygwin@cygwin.com
Subject: Fwd: Options for getting mandatory locking in cygwin1.dll (was: Promote sqlite 3.7.13-1 from test status?)
Date: Fri, 31 Aug 2012 19:12:00 -0000	[thread overview]
Message-ID: <CAJtt6BhVuCNviWe6teyau7mO2jytuUNa3TuMUryJBQFXZ4SZNA@mail.gmail.com> (raw)
In-Reply-To: <CAJtt6BgReBuo=EBfujsLHB+xLW1E_POsdOayDfM_RtyuWRpJbg@mail.gmail.com>

Here is a scenario that involves Cygwin Perl only.

I have a need for multiple Cygwin instances on the same box mainly due
to DLL bases and CPAN modules. I've already read through the endless
threads about both topics so there's no need to mention them. I have
good reasons to do what I'm doing.

Advisory locks don't work across cygwin instances. This is reasonable
but unexpected. That's not such a big deal - use the pidfile pattern
instead, until you realize that kill doesn't work across cygwin
instances either, so you can't check whether the process that owns the
lock is alive. So we are dealing with the possibility of zombie locks,
as well as being extra careful to avoid killing processes. Which, of
course, is impossible in practice.

It would be fantastic if there was eventually a way to get advisory
locks to work across cygwin installations. Mandatory locks would work
too. Or perhaps I should try Perl's own flock implementation.

Any feedback would be gratefully appreciated.


Terris

>
> Greetings, Corinna Vinschen!
>
> > 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.
>
> Sorry byt I can't live with it.
> Setting "noacl" mounts aside from "mand" will force me to choose one or
> another. And it wouldn't be a choice in Cygwin's favor.
> Forced use of POSIX'ised permissions have higher probability of breaking
> existing Windows applications, than using POSIX "suggestive" locks instead of
> appropriate strict locks could harm Cygwin applications.
>
> > 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...
>
>
> --
> WBR,
> Andrey Repin (anrdae...@freemail.ru) 17.08.2012, <17:01>

--
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-31 17:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJtt6BgReBuo=EBfujsLHB+xLW1E_POsdOayDfM_RtyuWRpJbg@mail.gmail.com>
2012-08-31 19:12 ` Terris Linenbach [this message]
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=CAJtt6BhVuCNviWe6teyau7mO2jytuUNa3TuMUryJBQFXZ4SZNA@mail.gmail.com \
    --to=cygwin@terris.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).