Subject: Re: ksh problem... :/
To: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
From: Igor <hibitek@globalserve.net>
List: netbsd-help
Date: 07/28/1998 16:01:38
I realized I could tell you more!  When ksh starts up during login-process, the
argv[0][0] should have value '-', (i.e.: argv[0] should be "-ksh").  Though your
C-code segments look fine to me, I do not know why would you  "hack" the ksh to set
your {{ LOGIN_SHELL }} variable, since you have a way to check whether the K-shell
is a a login shell at run time. Check the variable $0, and should you get "-ksh"
(with the dash) you are in login-shell. All sub-shells will not be "-ksh". This
check is usually limited to {{ .profiles }} and sourcing (dot executions) and is
bogus in subsequent shells and/or child-processes.

It looks to me that you are not running your test in the top shell..

Igor wrote:

> Mason Loring Bliss wrote:
>
> > When I run ksh, LOGIN_SHELL is *always* set to "NO". It doesn't matter if
> > I execute ksh from another shell, from an xterm with "-ls" set, manually
> > as "ksh -" or "ksh -l", or whatever.
>
> The {{ ksh - }} is not a login shell. If  I remember correctly Korn shell starts
> up as login shell with the following syntax {{ -ksh }}.  Unfortunately my
> systems are down, and I can not verify nor elaborate on this.Give it a try!
>
> Cheers Igor,
> :^)*