Hi -
I'm having a problem reading bash environment variables when running a
MinGW app on Cygwin's bash. I'm trying this on the MinGW list as well,
but no luck so far. The basic problem is that SHELL is not visible in
environ (or from getenv) on the app, even thought the program was
launched from bash, where SHELL has the value /bin/bash. Does that sound
familiar to anyone?
I've done some simple experimenting, as follows. I've written a
small test prog that prints out the contents of MinGW's stdlib
'environ'. This is what I'm seeing, running everything from a Cygwin
bash shell:
$ environ_dump.exe > env1
$ sort env1 > env1s
$ wc env1s
44 65 1464 env1s
$ set > env2
$ sort env2 > env2s
$ wc env2s
74 104 2062 env2s
Comparing env1s and env2s, I see:
1 - various bash environment variables never made it as far as
'environ'. These include all the BASH* variables, OSTYPE, SHELL, and so on.
2 - Various single-quoted variables from env2s end up unquoted in 'environ'.
3 - various other minor changes.
At first sight, it appears that all the bash and cygwin-specific stuff
has been left out of environ, but a lot of it is still there -
CVS_RSH, HOME, and so on.
Presumably I'm doing something really dumb. Any ideas? This is a
more-or-less out-of-the-box Win2K machine which I use for testing.
Thanks
-Paul
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/