This is the mail archive of the
mailing list for the Cygwin project.
SHELL env not exported in bash
- From: Pierre Muller <muller at cerbere dot u-strasbg dot fr>
- To: cygwin at cygwin dot com
- Date: Thu, 21 Feb 2002 13:12:53 +0100
- Subject: SHELL env not exported in bash
When I start the Cygwin bash shell
with the Cygwin installed procedure
the the SHELL env var is not exported.
(sh started from within bash,
or replacing bash in cygwin.bat,
does not even have a SHELL variable).
The simple program below
can check this:
shellenv = getenv("SHELL");
printf ("SHELL is '%s'", shellenv);
<<<<end of testshellenv.c>>>>
gcc -o testshellenv testshellenv.c
If I run ./testshellenv I get:
SHELL is '(null)'
If I enter
at bash prompt
SHELL is '/bin/bash'
Trying the same program on a remote linux machine
gives '/bin/bash' directly, but this is no real
proof as connecting to my local account with ssh
also results in a bash shell where SHELL envvar is exported.
I can't test on a local Linux machine, sorry.
So my basic question is:
is it intended behavior that SHELL
env variable is not exported when cygwin bash
is run locally?
This problem arises from the fact that one of the latest cygwin specific
GDB patch does make use of getenv("SHELL")
and I was rather surprised by the null result that I got here.
Institut Charles Sadron
F 67083 STRASBOURG CEDEX (France)
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html