sh can't run any programs from script when PATH exceeds 2500

Chris Felaco cfelaco@openmarket.com
Wed Feb 24 11:48:00 GMT 1999


Sorry for the resend, I forgot to mention I am running Cygwin B20.1 (binary distribution) on NT 4 SP3.

I have a sh script that basically sets up a bunch of environment
variables, constructs a PATH based on some input files and then runs a
program.  If the path is over 2500 characters, the program (no matter
what program it is) gives the following error:

foo: error 11

Even Win32 native apps such as cmd fail this way.  Unfortunately, I
can't easily reproduce the problem.  I've tried writing a simple bare
script to test it, but it won't fail.  It only fails in my rather
involved script that makes use of several input files from various
locations.

Is there a hard limit on the PATH size?  Is there perhaps a fixed buffer
size used for the PATH conversion in the cygwin DLL?   Any help or
suggestions are appreciated....





More information about the Cygwin mailing list