From: Zefram <zefram@tao.co.uk>
To: aumuelle@mi.uni-erlangen.de
Cc: zsh-workers@math.gatech.edu, aumuelle@mi.mi.uni-erlangen.de
Subject: Re: Wrong emulation mode if exec'd by su
Date: Mon, 15 Jun 1998 15:28:07 +0100 (BST) [thread overview]
Message-ID: <199806151428.PAA10680@taos.demon.co.uk> (raw)
In-Reply-To: <199806151358.PAA13243@helena.mi.uni-erlangen.de> from "Martin Aumueller" at Jun 15, 98 03:58:41 pm
Martin Aumueller wrote:
>I have a problem with zsh-3.1.4: If I su - to an account the zsh sees
>"su" as executable name -- starting with 's' -- and thus switches to
>Bourne shell emulation mode, not the behaviour desired by me. I have
>solved this problem by testing the full executable names against "sh",
>"csh" and "ksh" with strcmp and now it works as I expect it.
The original behaviour is correct. "su" really should not give the shell
this weird argv[0] (some versions don't). But on the older systems where
it does, it's more likely that the shell being invoked is supposed to
be sh, so treating a name of "su" as "sh" is the best behaviour.
To get round this problem, if you can't fix su, put an "exec zsh -l"
in your .profile. Optionally change your login shell to /bin/sh.
>However, in the patch below I didn't take into account the case
>starting with 'b', don't know what that should be,
"bsh" == Bourne shell.
-zefram
next prev parent reply other threads:[~1998-06-15 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-15 13:58 Martin Aumueller
1998-06-15 14:28 ` Zefram [this message]
1998-06-15 15:52 ` Bart Schaefer
1998-06-16 6:14 ` Bart Schaefer
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=199806151428.PAA10680@taos.demon.co.uk \
--to=zefram@tao.co.uk \
--cc=aumuelle@mi.mi.uni-erlangen.de \
--cc=aumuelle@mi.uni-erlangen.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).