From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers <zsh-workers@sunsite.dk>
Subject: Re: cd -s symlink hangs (sometimes?)
Date: Sat, 21 Mar 2009 00:15:24 +0100 [thread overview]
Message-ID: <237967ef0903201615x72769fe4va86273c3fa07cb2e@mail.gmail.com> (raw)
In-Reply-To: <20090320224856.73dae001@pws-pc>
2009/3/20 Peter Stephenson <p.w.stephenson@ntlworld.com>:
> On Fri, 20 Mar 2009 22:12:30 +0100
> Mikael Magnusson <mikachu@gmail.com> wrote:
>> zsh -f
>> % mkdir a
>> % ln -s a b
>> % cd -s b
>> cd: not a directory: b
>> % cd -s b
>> # kill -9 in another terminal
>> zsh: killed zsh -f
>
> The following is reproducible (note I didn't actually create the
> directory a):
>
> % zsh -f
> % cd ~
> % pwd
> /home/pws
> % rm -f a b
> % ln -s a b
> % cd -s b
> cd: not a directory: b
> % /bin/pwd
> /
At first I thought you misunderstood my problem, since the above seems
like a different problem, but the patch does fix my infinite loop.
Just for fun I tried mkdir a; cd a; rmdir ../a; cd -s ../symlink, and
it didn't break either.
[5 minutes later]
For some more fun I tried this, and it does still break:
mkdir a
ln -s a b
cd a
chmod -x .
cd -s $PWD:h/b
#infinite loop here still
chdir("../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../..")
= 0
I think this is related to .. not being accessible when . is -x? I
didn't study the code very closely (ie, I only read the patch
context). I should also note that this is not something I tend to do
very often, I was just thinking up ways in which the code might still
fail.
--
Mikael Magnusson
next prev parent reply other threads:[~2009-03-20 23:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 21:12 Mikael Magnusson
2009-03-20 22:48 ` Peter Stephenson
2009-03-20 23:15 ` Mikael Magnusson [this message]
2009-03-22 12:54 ` Peter Stephenson
2009-03-22 23:05 ` Mikael Magnusson
2009-03-23 10:49 ` Peter Stephenson
2009-03-23 11:46 ` Mikael Magnusson
2009-03-23 12:27 ` Peter Stephenson
2009-03-24 12:46 ` Peter Stephenson
2009-03-24 15:15 ` Bart Schaefer
2009-03-24 16:02 ` Peter Stephenson
2009-04-06 11:07 ` Mikael Magnusson
2009-04-06 11:13 ` Peter Stephenson
2009-03-23 15:18 ` Bart Schaefer
2009-03-23 15:39 ` Peter Stephenson
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=237967ef0903201615x72769fe4va86273c3fa07cb2e@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=zsh-workers@sunsite.dk \
/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).