Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: incorrect behavior of zsh under su on SUNOS-4.1.3
- X-seq: zsh-workers 3224
- From: Zefram <zefram@xxxxxxxxxxxxxxxxx>
- To: bluen@xxxxxxxxxxxx
- Subject: Re: incorrect behavior of zsh under su on SUNOS-4.1.3
- Date: Mon, 9 Jun 1997 17:09:24 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199706090840.KAA02522@xxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author