delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/23/17:59:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Thu, 23 Oct 2003 17:59:29 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Nicolas BUONOMO <buonomo DOT nicolas AT free DOT fr>
cc: cygwin AT cygwin DOT com
Subject: Re: Cygwin/bash: need environment variables >32K
In-Reply-To: <3F98424A.3010104@free.fr>
Message-ID: <Pine.GSO.4.56.0310231758360.15002@slinky.cs.nyu.edu>
References: <445C57B81208C24EAD99F2944DBB9D29030212FE AT BLNSS10A>
<200310230938 DOT LAA24318 AT trantor DOT eads-dsn DOT com> <20031023101047 DOT GZ1653 AT cygbert DOT vinschen DOT de>
<3F98424A DOT 3010104 AT free DOT fr>
Importance: Normal
MIME-Version: 1.0

On Thu, 23 Oct 2003, Nicolas BUONOMO wrote:

> Corinna Vinschen a ecrit :
>
> > 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
>
> I think it's possible to change the size of the environnement for
> the DOS box. I have do that for DOS application (on NT4), but I
> don't remeber how. I try to find it.
>
> Nicolas

It's the "/E" flag to cmd.exe.  However, that doesn't help you, as it only
increases the size of the *total* environment.  Each individual
environment variable is still limited to 32k.  That's Windows for you.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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