First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 91725
Alias:
Product:
Component:
Status: RESOLVED
Resolution: INVALID
Assigned To: Daniel Black <dragonheart@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Prof. Jonathan King <squash@math.ufl.edu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 91725 depends on: Show dependency tree
Bug 91725 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-05-06 12:27 0000
Running the bash shell:

    % echo $SHELL
    /bin/bash

    % tcsh

    % echo $SHELL
    /bin/bash

Is SHELL intended to show the original-invocation shell, or the
current shell?

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Daniel Black 2005-05-20 17:44:32 0000 -------
defered to experts in bug  35434 

------- Comment #2 From Fabian Groffen 2005-09-13 09:07:25 0000 -------
works fine for me...

% echo $SHELL
/bin/tcsh
% echo $shell
/bin/tcsh

------- Comment #3 From Fabian Groffen 2005-09-13 10:36:52 0000 -------
ok, if you fork a tcsh shell from a bash shell, indeed the $SHELL variable is
not (re)set.  the $shell variable (internal to tcsh) however, is set:

pegatoo linux # tcsh
(pegatoo:/usr/src/linux) # echo $SHELL
/bin/bash
(pegatoo:/usr/src/linux) # echo $shell
//bin/tcsh

otherwise it works like expected.  I think this not a Gentoo specific bug, but
more normal behaviour.  It works the same the other way around (on a non-Gentoo
system):

(pegasus:current/xquery/runtime) % echo $SHELL
/bin/tcsh
(pegasus:current/xquery/runtime) % bash
bash-3.00$ echo $SHELL
/bin/tcsh

Judging from this behaviour, I think it shouldn't and this bug can be closed.

------- Comment #4 From Fabian Groffen 2005-09-27 12:26:38 0000 -------
This is normal behaviour.  Only login shells set the SHELL variable.

------- Comment #5 From Matus UHLAR - fantomas 2006-11-27 08:54:12 0000 -------
I think not the login _shell_, bug the _login_ process should set SHELL
variable.
the SHELL should contain users' login shell, not anything like "last (login)
shell executed". I think this bug is bogus, and that the "setenv SHELL" should
disappear from /etc/csh.login.

Is user wishes so, he may set SHELL in his ~/.* rc files

------- Comment #6 From Fabian Groffen 2006-11-27 09:07:37 0000 -------
(In reply to comment #5)
> ... I think this bug is bogus, and that the "setenv SHELL" should
> disappear from /etc/csh.login.

I believe it is there for compatibility with scripts that rely on $SHELL being
defined, while tcsh internally uses $shell for that.

------- Comment #7 From Matus UHLAR - fantomas 2006-11-27 09:15:57 0000 -------
$shell in (t)csh is a local variable, used internally. It has to be set to
(t)csh location. $SHELL is environment variable set by login and contains a
variable a any program should execute when user wishes to jump to shell (many
programs still support shell escape). So, they two have different meanings.
Imho none of them should be set by rc script, unless user wishes so (and to his
own responsibility).

Just my SKK.02 ;)

------- Comment #8 From Fabian Groffen 2006-11-27 09:57:05 0000 -------
I'll dig into a few other distros to see what they do, and yank the SHELL = bla
thing if none do that.  How about that?

First Last Prev Next    No search results available      Search page      Enter new bug