From: Mark Borges <mdb@cdc.noaa.gov>
To: ZSH mailing list <zsh-workers@math.gatech.edu>
Subject: [list abuse] bug in /bin/csh and /usr/local/bin/tcsh?
Date: 05 Sep 1997 14:16:16 -0600 [thread overview]
Message-ID: <vksovja54f.fsf@cdc.noaa.gov> (raw)
This is certainly not a zsh bug, but since this list has many members
who know far more about the internals of shells than I, I thought it
would be a good forum.
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?
For instance,
$ truss /bin/csh -c 'echo foobar' |& grep /archive
lstat("./../archive", 0xEFFFC400) = 0
$ truss /usr/local/bin/tcsh -c 'echo foobar' |& grep /archive
lstat("../archive", 0xEFFFE308) = 0
$ truss /bin/sh -c 'echo foobar' |& grep /archive
$ truss /usr/local/bin/zsh -c 'echo foobar' |& grep /archive
$ truss /bin/ksh -c 'echo foobar' |& grep /archive
$ uname -a
SunOS solberg 5.5.1 Generic_103640-08 sun4u sparc SUNW,Ultra-2
$
(Note that zsh, sh, and ksh do not do the lstat. archive is a mount
point in / for an NFS mounted partition. The script was invoked in a
subdirectory of /).
Ordinarily, this is not a big problem. But, one of our users has many
/bin/csh scripts in his crontab, and when /archive is inaccessible
(it's a jukebox filesystem that is *very* flaky) his /bin/csh cronjobs
hang and fail to execute.
As a potential workaround, we've NFS mounted this volume read-only and
soft-mounted (it was rw and hard mounted) in the hope that the shell
will at least start up and execute the script (which has nothing to do
with /archive). Or will this fail, too?
Any comments or other suggested work-arounds are most welcome. I've
tried "don't write scripts in /bin/csh!", but that falls on deaf ears
;-).
--
-mb-
next reply other threads:[~1997-09-05 20:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-05 20:16 Mark Borges [this message]
1997-09-05 22:00 Amol Deshpande
1997-09-08 10:52 Duncan Sinclair
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=vksovja54f.fsf@cdc.noaa.gov \
--to=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).