This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: zsh-4.2.0-1


On Fri, 26 Mar 2004, Igor Pechtchanski wrote:

> On Fri, 26 Mar 2004, Thorsten Kampe wrote:
>
> > * Peter A. Castro (2004-03-26 18:10 +0100)
> > > BTW, I've tried many, many ways to reproduce your original hang
> > > problem but am still unable to do so.
> >
> > One last try: I have recently set option "autocd"[1]. Now when I type
> > something like "adksfaj" the delay (~ 10 seconds) is the same like
> > with the correction mechanism ("/skjhf/aksjfdh"). It is noticeable
> > that unlike normal completions I cannot stop the "hanging" search (or
> > whatever it is) by [Ctrl]-[C].
> >
> > In /this case/ I have found the "culprit": I have "/" in my CDPATH[2].
> > When I remove "/" it "works" normally by instantly saying "command not
> > found". Of course this "doesn't make sense" as there are only nine
> > directories in "/" and of course having "/" in cdpath is okay on my
> > Linux box.
>
> FWIW, I know nothing about zsh; I don't use it; but your statement above
> triggered an association, so here's a WAG.  Many applications assume that
> having multiple trailing slashes is equivalent to having one slash (and it
> is in Linux).  I have seen applications blindly appending a "/" to a path,
> just to make sure it ends in a / (don't know if zsh does it).  This, of
> course, doesn't work in Cygwin when the path is just a "/", because a "//"
> prefix is special.  I'd look through the path composition pieces of the
> zsh code to see if "/" is ever appended -- I think that might be your
> culprit.  The fix would be to check whether a path ends in "/" before
> appending one.  HTH,

Hi Igor & Thorsten,
  Nope, I'd thought about that as well, but this specific kind of problem
was identified back in version 4.0.6.  File lookups using PATH or CDPATH
were in deed append a "/" to various name combinations and would some
times generate names like "//bin" if you had "/" in your CDPATH and typed
"cd bin" and thus Windows would treat it as a host name lookup.  But,
that's been fixed, as of 4.0.6-3, and I've not seen any reports
concerning it since.
  However, I was just playing around with some network things, and think
I might have found what's going on.  When you issue a command, Zsh
searches the dirs in PATH and CDPATH to find commands or directories to
implicitly cd to.  Zsh stats every file in each directory.  If a file
happens to be a symlink, Zsh follows the link to the destination file.
Well, if that symlink points to a nework drive, Zsh will try and stat it.
If that remote host can't be contacted, it will seem like Zsh is hanging,
when in reality it's waiting for the network to respond.
  Please do this:  For every directory in your $PATH and $CDPATH, please
examine all the files in it and see if any are any symlinks.  If so, see
where those links go and try and access them manually.
  I also tried the following:
  $ setopt autocd
  $ mkdir $HOME/testdir
  $ ln -s '\\real-hostname\driveshare' testdir/remdrive
  $ export CDPATH=$HOME/testdir
  $ remdrive
This invokes the autocd mechanism and forces it to try and stat the file
'remdrive'.  The host I used for this tested exist in DNS, but was not
responding, and so the shell 'hung' for about 1 minute before eventually
replying 'command not found'.  I'm thinking you may have something like
this in either your PATH or CDPATH.
  I'm just grasping at straws here, so feel free to say I'm all wet on
this.

> 	Igor
>
> > Maybe this "bug" (or whatever) is just "behaving" the same way like
> > the "correction bug" but my hope is that it may "ring some bell" on
> > your side (or any zsh user's)...
> >
> > > It is my hope that 1.5.10 will resolve this for you.  But, if not,
> > > some serious debugging will need to be done on your machine.  Have
> > > you tried the latest snapshot?
> >
> > I will try it when it's bash-unbroken ;-)
> >
> > Thorsten
> >
> > [1] "If a command is issued that can't be executed as a normal
> > command, and the command is the name of a directory, perform the cd
> > command to that directory"
> >
> > [2] cdpath=(.. ~ / /cygdrive/h /cygdrive/g /cygdrive/c)

-- 
Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]