Date: Wed, 02 Jul 1997 15:03:28 +0200 From: Hans-Bernhard Broeker Subject: Re: Some things don't run under bash--(Resolution) To: velman AT alumni DOT caltech DOT edu (John Velman) Cc: djgpp AT delorie DOT com Message-id: <01IKRKCQZOEQ00004P@mail> Organization: RWTH Aachen, III. physikalisches Institut B Content-transfer-encoding: 7BIT Newsgroups: comp.os.msdos.djgpp Precedence: bulk In article <5pbqm4$atc AT hacgate2 DOT hac DOT com> you wrote: > In article <5orulb$lln AT hacgate2 DOT hac DOT com>, velman AT alumni DOT caltech DOT edu says... > I got very helpful responses to this (from both Eli Zaretskii and > Hans-Bernhard Broeker) that led me to the answer. The answer is > just a little bit subtle, so I thought I would post it. Glad to have been of some assistance :-) In fact, I could have told you most of what you found out on your own right away, but the learning effect wouldn't have been half as strong for you... [...] > When you run a new command interpreter, the default environment size > for the child is the larger of 256 bytes and the actual memory **in > use** by the parent command interpreter. It has nothing to do with > the E switch used when calling the parent. To override the default, > you have to set an E switch on the call to the child. To add a bit of precision: the memory currently in use is rounded up a bit (16 byte paragraphs, or something like it), so you do have *some* bytes at your disposal, actually. > Interesting default. This is the understatement of the week, I'd say :-) > So, when running programs that need a lot of envirnment, use a new > command.com with an appropriately large E:/nnnn. Yep. The same issue pops up whenever youtry to debug batch files that make any serious use of env. variables, by single-stepping through them: you'll have to 'command /y /e:2000 /c doit.bat'. Or when you try to start such batch files from any kind of 'Shell to DOS'. Or when you run them from Norton commander, etc. etc. In short, each invocation of command.com except the initial one that executed autoexec.bat will have this problem. > Unfortunately, I haven't figured out how to get a windows PIF to > start bash directly with a large environment space. Shouldn't be necessary. Bash has it's own space to hold it's environment variables, AFAIK. But it does make sense to add an /e:2048 to the command line of 'dosprmpt.pif', if you ever intend to run batch files from such a DOS box. HBB