Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unable to read history on latest Cygwin
- X-seq: zsh-users 14653
- From: Wayne Davison <4wayned@xxxxxxxxx>
- To: Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx>
- Subject: Re: Unable to read history on latest Cygwin
- Date: Wed, 16 Dec 2009 07:54:08 -0800
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=DPNOpfnwPaNE/zV8O+0PSdQWar+BEZ1timh9mAmdamU=; b=xI0WYHqxqRfBxY8JXmg3a7O/6FesNPRLmDXVSGccITCzrS6qOphYbNU1/bTlvrf0OD Y+JsMUsLbfczvywZhjkX928XW6p159PYOQJwBfToITXLKL8buys98VGdhJA5vgBadqAY 0i65EcNsv+rjSu7IzJLVNuiJ8oegAUC0nOVxM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=bL8ed6RQLlUbjrn2f4j5aKBelb8icsQs8r/Df5Wh4cgTeZk1Sqnt/0hGmalm0uccsh qIHRKm/CxqTG2eihzyDjZJaCosb0vWxK2YiGP2hfD0cQ3EGbtO/qKUgUXbcfnCAwbmOX VVOfuBpgt9sU4NjzpF1wtCmnFBq6pRI9iKFdY=
- In-reply-to: <1260800369.32429.1350005931@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <1260800369.32429.1350005931@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Mon, Dec 14, 2009 at 6:19 AM, Thorsten Kampe
<thorsten@xxxxxxxxxxxxxxxx>wrote:
> The result of that is that I'm not able to run zsh "portable" from a
> FAT32 USB thumb drive: "zsh: failed to create hard link as lock file
> /home/thorsten/.zhistory.LOCK: operation not permitted".
>
One simple possibility is to change the two #ifdef HAVE_LINK lines in hist.c
to this:
#if defined HAVE_LINK && !defined __CYGWIN__
That should make it use the open with O_EXCL, which is hopefully atomic.
As for Peter's idea of using a symlink, do you know if the cygwin folks
mention if their emulation of a symlink is an atomic operation? We could
completely get rid of the temp file (used in the hard-link code) and just
create a symlink named for the lock file, pointing at (essentially)
$PID/$HOST (since it doesn't matter if the link is valid, just that it
exists). 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()).
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author