zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@dcs.warwick.ac.uk>
To: bluen@ee.uni-sb.de
Cc: zsh-workers@math.gatech.edu
Subject: Re: incorrect behavior of zsh under su on SUNOS-4.1.3
Date: Mon, 9 Jun 1997 17:09:24 +0100 (BST)	[thread overview]
Message-ID: <25499.199706091609@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <199706090840.KAA02522@ee.uni-sb.de> from "Juergen Peter "bluen" at Jun 9, 97 10:40:05 am

Juergen Peter "bluen wrote:
>what many programs do to spawn a shell or a subshell,
>zsh_name (the variable in the sourcecode) is set to argv[0] of the
>spawning program.

zsh_name is set to zsh's argv[0], which is whatever the execing program
wants it to be.

>This looks quite ok for me (at least for most programs), but when the
>shell-spawning program is /bin/su (or /usr/5bin/su) of SunOS, this
>prevents the shell from reading its initialisation files (/etc/zshenv
>and so on),

Opinion: this behaviour of su is broken.  It should set argv[0]
conventionally -- the shell has no need to know it is being run by su.

>	if zsh_name is set to something different than zsh (or -zsh),
>	always set it to "zsh", so that init files are read for every
>	subshell in the ususal way.

No, there's a reason why zsh_name gets set to argv[0].  zsh will emulate
ksh or POSIX sh if argv[0] (and therefore zsh_name) are set to "ksh" or
"sh".  If zsh_name were always "zsh", there wouldn't be any point in it
being a variable.

-zefram


  reply	other threads:[~1997-06-09 16:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-09  8:40 Juergen Peter bluen
1997-06-09 16:09 ` Zefram [this message]
1997-06-10  5:59 ` Andrej Borsenkow

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=25499.199706091609@stone.dcs.warwick.ac.uk \
    --to=zefram@dcs.warwick.ac.uk \
    --cc=bluen@ee.uni-sb.de \
    --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).