Re: Environment limit on NT



From: Sumit Sahu <iitgsumit@xxxxxxxxx>
I am running into a strange problem when running perl on Windows.
Basically, the 'system' command seems to be exitting abruptly. I
traced it down and found that this problem occurs only when the PATH
variable is too long (Yet to define how long is too long but the
common observation is around 6000 characters ) and when another
variable is set to be the same as PATH. Under such an environment,
when I run a perl script containing just the following : system("echo
hello");

the system command just doesnt seem to work. I am using
perl-5.6.0.623. Is there a limit on the length of an environment
variable or the total number of environment variables ? Perl is used
heavily in our field and I have been running into these problems since
a long time, therefore any pointers/suggestions would be greatly
appreciated.

Thanks,
Sumit

6000 characters long PATH? Either you have some very very long paths
or way too many directories. Are you sure you need to have them all
there? Really?

There is a limit to the total size of the environment and I really do
not think you can get around that. Except for trimming down the %ENV
before starting anything. I do think you should trim down your path
for the whole system though.

Jenda
===== Jenda@xxxxxxxxxxx === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

.



Relevant Pages

  • Re: process control
    ... command so that it completes before moving on to the next process. ... > three sibling processes then they will inherit their environment from ... modified my environment} in a perl script. ...
    (comp.lang.perl.misc)
  • Re: SETDOS /X-4-6
    ... The parser has to keep track of the current context; the 0x01 as the first character in GOSUB variable names signals that it is a "very local" variable; the next character in the name is the context. ... As I already wrote, GOSUB and FOR variables in 4DOS are not stored in the environment but temporary stored in memory, and their lifetime is only during the command. ... Nor they are preceded by control characters, with the exception of the single-character FOR variables. ...
    (comp.os.msdos.4dos)
  • Re: Text environment
    ... | standard environment - but the problem is not this but distinguishing ... Control characters are not valid in variable names. ... The parser has to keep track of the current context; ... In most other command processor languages the value of a variable does not ...
    (comp.os.msdos.4dos)
  • RE: setting unix command through perl script
    ... setting unix command through perl script ... it changes the environment of the shell you ... If I run this command on bash prompt then it is executing properly but ...
    (perl.beginners)
  • Re: Environment limit on NT
    ... the 'system' command seems to be exitting abruptly. ... common observation is around 6000 characters) and when another ... when I run a perl script containing just the following: ... Is there a limit on the length of an environment ...
    (perl.beginners)