delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/21/15:14:04

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 <corinna-cygwin AT cygwin DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019