delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/25/05:03:35

Date: Mon, 25 Dec 2000 10:58:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Kenneth Doyle <cyberpunk AT notmail DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: "Command line too long"
In-Reply-To: <3A464377.A415CDD7@notmail.com>
Message-ID: <Pine.SUN.3.91.1001225105744.18547F-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 25 Dec 2000, Kenneth Doyle wrote:

> > This enlarges the available space for environment variables used by
> > COMMAND.COM, but doesn't change the space which DJGPP programs use to
> > store environment variables (which is allocated as the need arises) or
> > to pass them to child programs (which is 16KB by default, but can be
> > changed by running STUBEDIT).
> 
> Ah, interesting.  I had just assumed that DJGPP used the DOS environment.

There is no such thing as ``the DOS environment''.  The environment
block which you manipulate by using the /E: switch to COMMAND.COM is
COMMAND.COM's environment.  When a DJGPP program is invoked, it gets
its own environment block, which is a copy of the one from
COMMAND.COM.  The DJGPP program's startup code then copies all the
environment variables into the program's memory address space (so that
getenv works without expensive copies from conventional memory).  When
a DJGPP program invokes another program, it uses a 16KB block in
conventional memory, the transfer buffer, to construct an environment
block for the child program, by copying all the environment variables
defined at that point to the transfer buffer.  Thus, the size of the
transfer buffer is what limits the maximum size of the environment
passed to child programs.

> But hang on, if the variables are set in AUTOEXEC.BAT, wouldnt they
> also be in the DOS environment?  They certainly show up in a DOS box
> when I type "set".

Yes.  But I don't understand what does this have to do with the
original issue (which was inability of RHIDE to pass long command
lines because of a large environment).

> No, but wait, if that was the problem, then the
> result would show up long before running anything in DJGPP....

Sorry, I don't understand what this sentence means.

- Raw text -


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