zsh-workers
 help / color / mirror / code / Atom feed
From: Duncan Sinclair <sinclair@dis.strath.ac.uk>
To: Mark Borges <mdb@cdc.noaa.gov>
Cc: ZSH mailing list <zsh-workers@math.gatech.edu>
Subject: Re: [list abuse] bug in /bin/csh and /usr/local/bin/tcsh?
Date: Mon, 08 Sep 1997 11:52:06 +0100	[thread overview]
Message-ID: <5767.873715926@dis.strath.ac.uk> (raw)
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.


             reply	other threads:[~1997-09-08 11:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-08 10:52 Duncan Sinclair [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-09-05 22:00 Amol Deshpande
1997-09-05 20:16 Mark Borges

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=5767.873715926@dis.strath.ac.uk \
    --to=sinclair@dis.strath.ac.uk \
    --cc=mdb@cdc.noaa.gov \
    --cc=zsh-workers@math.gatech.edu \
    /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).