This is the mail archive of the 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/bash: need environment variables >32K

On Thu, Oct 23, 2003 at 11:39:39AM +0200, david.liberce wrote:
> I reproduce this behaviour.
> Looks like the PATH  environment variable is not valid anymore after $VAR
> has been asigned?

Nope.  I debugged this situation.  It looks like a Windows restriction.
When trying to call CreateProcess() with this long environment variable
in the environment block, CreateProcess() fails with Windows error 87,
"The parameter is incorrect."  But there's no hint about a limit in the
CreateProcess() man page.

*dig, dig, dig*

Uh, ok, I found the following hint in the GetEnvironmentVariable() man page:

      [out] Pointer to a buffer that receives the contents of the specified
      environment variable. An environment variable has a maximum size limit
      of 32,767 characters, including the null-terminating character.

So, that explains it.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

Unsubscribe info:
Problem reports:

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