Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Thu, 23 Oct 2003 12:10:47 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin/bash: need environment variables >32K
Message-ID: <20031023101047.GZ1653@cygbert.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <445C57B81208C24EAD99F2944DBB9D29030212FE@BLNSS10A> <200310230938.LAA24318@trantor.eads-dsn.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200310230938.LAA24318@trantor.eads-dsn.com>
User-Agent: Mutt/1.4.1i

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:

  lpBuffer 
      [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

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

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

