Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Wrong emulation mode if exec'd by su
- X-seq: zsh-workers 4121
- From: Zefram <zefram@xxxxxxxxx>
- To: aumuelle@xxxxxxxxxxxxxxxxxx
- Subject: Re: Wrong emulation mode if exec'd by su
- Date: Mon, 15 Jun 1998 15:28:07 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx, aumuelle@xxxxxxxxxxxxxxxxxxxxx
- In-reply-to: <199806151358.PAA13243@xxxxxxxxxxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author