zsh-workers
 help / color / mirror / code / Atom feed
From: Amol Deshpande <amold@MICROSOFT.com>
To: ZSH mailing list <zsh-workers@math.gatech.edu>,
	"'Mark Borges'" <mdb@cdc.noaa.gov>
Subject: RE: [list abuse] bug in /bin/csh and /usr/local/bin/tcsh?
Date: Fri, 5 Sep 1997 15:00:33 -0700	[thread overview]
Message-ID: <AF4C1F8C5306D111AD5F0000F8662ED314E017@RED-MSG-41.dns.microsoft.com> (raw)

It looks like this is done to get the current working directory on
certain sysv systems.
lstat of every dir in the root seems to kick in when the shell is
invoked from a device
different from the root paritition.

this is just from a cursory glance at the source, and I don't know
anything about
system v. caveat emptor etc. etc.

perhaps they are working around an old  bug in the getwd() call ?

-amol
> ----------
> From: 	Mark Borges[SMTP:mdb@cdc.noaa.gov]
> Sent: 	Friday, September 05, 1997 1:16 PM
> To: 	ZSH mailing list
> Subject: 	[list abuse] bug in /bin/csh and /usr/local/bin/tcsh?
> 
> 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-
> 


             reply	other threads:[~1997-09-05 23:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-05 22:00 Amol Deshpande [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-09-08 10:52 Duncan Sinclair
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=AF4C1F8C5306D111AD5F0000F8662ED314E017@RED-MSG-41.dns.microsoft.com \
    --to=amold@microsoft.com \
    --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).