Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <4.2.0.58.20020221112158.00a4a988@ics.u-strasbg.fr> X-Sender: muller AT ics DOT u-strasbg DOT fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Thu, 21 Feb 2002 13:12:53 +0100 To: cygwin AT cygwin DOT com From: Pierre Muller Subject: SHELL env not exported in bash Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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: <<<>>> #include int main () { char *shellenv; shellenv = getenv("SHELL"); printf ("SHELL is '%s'", shellenv); return 0; } <<<>>> gcc -o testshellenv testshellenv.c If I run ./testshellenv I get: SHELL is '(null)' If I enter export SHELL at bash prompt then ./testgetenv returns: 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. Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller AT ics DOT u-strasbg DOT fr 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 Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/