This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin app not receiving modified PATH env var


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]