Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: weird zsh startup behavior

On Sat, Aug 09, 1997 at 05:11:53AM +0000, Geoff Wing wrote:
> John M. Harres <harres@xxxxxxxx> typed:
> :On Fri 8 Aug 1997, Zoltan Hidvegi wrote:
> :> > Does anyone know under what circumstances zsh will change directory on 
> :> > startup?  I was in root under sh, ran zsh, and zappo, switched directories,
> :> > and not to root's home directory.  Both home directories are automounted.
> :> We can only fix this problem if you provide more details about the
> :> problem.  What zsh version, OS, OS version, libc version, compiler are
> :> you using?  Can you reproduce this with zsh -f?  If not, try to find the
> :> command in you startup files which triggers the problem.
> :Sorry, brain on hold.  zsh 3.0.4, Solaris 2.5.1, gcc-, whatever libc
> :Sun ships withe Solaris 2.5.1.
> :Reproduced with zsh -f:
> Can you reproduce it with "zsh -f" and no /etc/zshenv?

Ack, I never wrote the list about this, did I?

I saw this on a similar setup - Solaris 2.4, home directories automounted,
zsh 3.0 betas I think.  I no longer have access to this system, so I can't
double check the details, but they're not terribly important.

The problem was an assumption made in zgetcwd(), which didn't hold with
the automounted home dirs.  I don't seem to have the patch I made, and I'm
going on foggy memory here I'm afraid.

Anything that caused a zgetcwd() would end up *changing* the current

Looking at zgetcwd, I'm thinking that the false assumption was that only
one mountpoint could have the same device number ("if (sbuf.st_dev == dev)
goto match;" around lines 178-179 in 3.0.4:compat.c).  With sun's
automounter, with multiple directories from the same device mounted into
the same directory, this wasn't true.  I assume my fix was to check the
inode too.

Sorry this is so vague and wishy washy, but hopefully it will save some
time tracking down the details.

Messages sorted by: Reverse Date, Date, Thread, Author