X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <47AB1384.80600@cyconix.com> Date: Thu, 07 Feb 2008 14:19:48 +0000 From: Paul Leder User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Cygwin Subject: Incomplete environ when running MinGW apps? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/