Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [list abuse] bug in /bin/csh and /usr/local/bin/tcsh?
- X-seq: zsh-workers 3481
- From: Duncan Sinclair <sinclair@xxxxxxxxxxxxxxxx>
- To: Mark Borges <mdb@xxxxxxxxxxxx>
- Subject: Re: [list abuse] bug in /bin/csh and /usr/local/bin/tcsh?
- Date: Mon, 08 Sep 1997 11:52:06 +0100
- Cc: ZSH mailing list <zsh-workers@xxxxxxxxxxxxxxx>
- In-reply-to: Your message of "05 Sep 1997 14:16:16 MDT."
>Q: Why do /bin/csh and /usr/local/bin/tcsh, as part of their startup
> process, do an lstat of every directory in the root partition where
> the shell was invoked?
They both do a getwd() call, which does the lstat()s.
The problem is that getwd() needs to search through each directory
as it moves up the file system heirarchy. If they stumble across
a dead NFS mount, they hang.
For sh, it doesn't try to maintain a "PWD" variable, so it couldn't
care less.
For ksh, and zsh, it first tries to see if "HOME" or "PWD" is
the actual current working directory. If so, they don't need
to do the getwd() call.
This is *the* feature I was prepared to sell my soul for when
Paul F. was first writing zsh, those many years ago.
The general solution, almost a mantra in some unix news groups,
is that you shouldn't NFS mount *anything* in /.
You might want to try a symlink to a more secure mount point.
Duncan.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author