Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: cd -s symlink hangs (sometimes?)
On Mar 24, 12:46pm, Peter Stephenson wrote:
}
} For the diagnostics and pwd, I've just borrowed what the recursive
} handling in zsh/files does, which is cd to /, set pwd consistently,
} and report the error.
This is calling zerr(), which sets errflag, which means a script that
encounters this problem would abort at that point, correct? (That
seems to be the behavior in a few simple tests I did.)
I'd be worried that if the only error is that chdir returns nonzero,
changing into the root directory creates a security problem (what if
the user is privileged and the next command is "rm -rf *" etc.).
Maybe it would be better to first attempt chdir($HOME) and only fall
back on "/" if that also fails. Also, should $OLDPWD be getting updated?
I'm undecided on that. We did change directories, even though not to the
desired destination.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author