zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: zsh got stuck without any message because of history lock file
Date: Fri, 25 Apr 2014 08:53:11 -0700	[thread overview]
Message-ID: <140425085311.ZM12268@torch.brasslantern.com> (raw)
In-Reply-To: <20140425093525.3754a495@pwslap01u.europe.root.pri>

On Apr 25,  9:35am, Peter Stephenson wrote:
}
} It's hard to construct an argument where locking a single file with
} multiple different mechanisms is the right answer.

The argument goes something like this:

Consider a .zhistory on a shared filesystem (NFS or Samba).  Mutliple
hosts access this file system.  Some of the operating systems involved
support fcntl(), some do not.

In this situation the only correct thing is to use the .LOCK file, but
that might be expensive for some of the hosts that have fcntl().  Posit
that these are the busiest hosts, most likely to have lock contention.

In this circumstance it may be beneficial to "fail faster" by attempting
fcntl() [which blocks out all the other zsh that support it], then only
create the .LOCK file [to block out the rest] after fcntl() succeeds.

I don't claim this scenario is likely or that we have to account for it,
but prior to 32580 zsh *has* supported it.


  parent reply	other threads:[~2014-04-25 15:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24 16:48 Andreas
2014-04-24 17:02 ` Bart Schaefer
2014-04-25  5:02   ` Bart Schaefer
2014-04-25  8:35     ` Peter Stephenson
2014-04-25 15:26       ` Bart Schaefer
2014-04-25 15:53       ` Bart Schaefer [this message]
2014-06-26 20:46     ` Mikael Magnusson
2014-09-06  9:03       ` Mikael Magnusson
2014-09-06 18:51         ` Bart Schaefer
2014-04-24 17:58 ` Andreas

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=140425085311.ZM12268@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).