X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 21 Feb 2012 21:13:08 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Environment passing bug? Message-ID: <20120221201308.GC30467@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4F42D201 DOT 4000901 AT cwilson DOT fastmail DOT fm> <20120221095025 DOT GD22597 AT calimero DOT vinschen DOT de> <4F43EE3C DOT 6030306 AT cwilson DOT fastmail DOT fm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F43EE3C.6030306@cwilson.fastmail.fm> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Feb 21 14:19, Charles Wilson wrote: > $ ./envprint.exe | grep -i temp > 'TEMP=C:\cygwin\tmp' > 'temp=C:\Temp' > 'tmp=C:\Temp' > ====== xp-64 ======== > > ...and the only mystery now is how my $ATWORK stuff should deal with the > fact that there are TWO different copies of the "same" variable in the > environment, if the $TESTAPP is started from cygwin rather than plan old > dosbox. > > ...or, is it possible that cygwin should not export both copies of > TEMP/temp, TMP/tmp when spawning a native process? I wouldn't want that. Even if the Win32 functions GetEnvironmentVariable and SetEnvironmentVaribale handle variable names case insensitive, the GetEnvironmentStrings function returns the environment block verbatim. So it's kind of your application's own problem if you don't handle that correctly. Also, in cases like this: bash$ export FOO=FOO bash$ export foo=foo bash $ cmd C:\> bash echo $FOO $foo I would like to see the output FOO foo and not just "FOO" or "foo", depending on which came first. Also, if you merge them, how do you know which one is the one you need for your Win32 application? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple