zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@zsh.org
Subject: Re: Unable to read history on latest Cygwin
Date: Fri, 18 Dec 2009 10:25:12 +0000	[thread overview]
Message-ID: <20091218102512.540c0c87@news01> (raw)
In-Reply-To: <733654e30912171200g1f135030j5d3f978648caca70@mail.gmail.com>

On Thu, 17 Dec 2009 12:00:25 -0800
Wayne Davison <wayned@users.sourceforge.net> wrote:
> On Wed, Dec 16, 2009 at 7:54 AM, Wayne Davison <4wayned@gmail.com> wrote:
> 
> > According to various web docs, symlinks are atomic on NFS, so that might be
> > a good thing to use in general (replacing the use of link()).
> >
> 
> Attached is my patch for adding preferential use of a symlink as the locking
> mechanism.  This should interoperate just fine with a hard-link creating
> locker, but sadly, will have issues if another locker is using open with
> O_EXCL.  I've made the symlink name "/pid-$PID/host-$HOST" in an attempt to
> make a create (open) over an existing symlink fail with an error (unless the
> /pid-$PID dir happens to exist and is writable).  We could try to add
> O_NOFOLLOW (when available) to the O_EXCL-open as well.  However, hopefully
> no system will exist where one zsh locker is trying to use open-locking and
> another is trying to use a link-locking idiom.
> 
> What do you think?  Dangerous?  Useful?

(I moved this to zsh-workers.)

What about the historical behaviour of zsh?  Are there old versions of the
shell that might do something inconsistent with this?  This is not a
typical problem for most users, anyway, but it would be good not to stir
things up unnecessarily.

Other than that I can't think of any aspect that looks particularly
dangerous.  We could limit this to both HAVE_LINK and HAVE_SYMLINK to
ensure it didn't change the behaviour on systems without link()---slightly
illogical but unlikely to be a real limitation on the most common systems.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


       reply	other threads:[~2009-12-18 10:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1260800369.32429.1350005931@webmail.messagingengine.com>
     [not found] ` <733654e30912160754q5e505cabo4a2510b41bf1d892@mail.gmail.com>
     [not found]   ` <733654e30912171200g1f135030j5d3f978648caca70@mail.gmail.com>
2009-12-18 10:25     ` Peter Stephenson [this message]
     [not found]   ` <Pine.LNX.4.64.0912162357250.19572@gremlin.fruitbat.org>
     [not found]     ` <733654e30912171119v16378e1el494468c1e0e4838e@mail.gmail.com>
2009-12-19  0:48       ` Peter A. Castro

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=20091218102512.540c0c87@news01 \
    --to=pws@csr.com \
    --cc=zsh-workers@zsh.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).