www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/06/18/04:51:43

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 18 Jun 2008 10:51:18 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin app not receiving modified PATH env var
Message-ID: <20080618085118.GB20180@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20080617034152 DOT GD7632 AT samus DOT subfocal DOT net> <20080618010536 DOT GE7632 AT samus DOT subfocal DOT net> <20080618080059 DOT GF7632 AT samus DOT subfocal DOT net>
MIME-Version: 1.0
In-Reply-To: <20080618080059.GF7632@samus.subfocal.net>
User-Agent: Mutt/1.5.16 (2007-06-09)
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 Jun 18 04:00, Mike Mueller wrote:
> A little further info.  It looks like apr detects a unicode environment,
> so ultimately is calling CreateProcessW (not CreateProcessA).

How do you pass your unicode env?  Do you set the CREATE_UNICODE_ENVIRONMENT
flag?

> Also, if I pass environment variables other than PATH, they are set
> properly when the child executes.  I'm even able to override other
> variables that are set already in the environment, and the new value is
> seen by the child.  PATH is the only variable I can't get to work.

Is your environment big (> 32K)?  Up to 1.5.25 the environment is
fetched using GetEnvironmentStringsA, which has a bug in (at least)
Windows XP which results in a truncated environment in the child.  And
it's not truncated to 32K, but much less from my testing.  Something
along the lines of sizeof (child_env) == sizeof (parent_env) % 32K.

Other than that, I have no idea.  PATH is taken from the parent like
any other env var.  Are you *sure* there's not some bug in your app?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/

- Raw text -


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