Subject: Re: sh can't run any programs from script when PATH exceeds 2500
From: Chris Felaco <[email-masked]>
To: [email-masked]
Cc: cygwin <[email-masked]>
Date: Tue, 02 Mar 1999 15:14:31 -0500

Upon further investigation, it appears that the real problem is when the size of the environment exceeds ~32K.  I cleaned up my path (bare minimum) and ran the enclosed script to prove my point.

I also wrote a cmd file to test the native behavior.  I didn't have any problems starting up programs with the large environment, but for some reason, not all of the environment gets passed to cygwin apps.  A simple env command doesn't list all of the variables I created.

Earnie Boyd wrote:

> ---Chris Felaco <[email-masked]> wrote:
> 8<
> > Path: /cygnus/CYGWIN~1/H-I586~1/bin
> >       /batch
> >       /WINNT/system32
> >       /WINNT
> >       /PROGRA~1/DEVSTU~1/SHARED~1/bin/ide
> >       /PROGRA~1/DEVSTU~1/SHARED~1/bin
> >       /Progra~1/DevStudio/VC/bin
> >       /emacs-20.3.1/bin
> >       /PROGRA~1/Tcl/bin
> >       /emacs-20.3.1/bin
> >       /PROGRA~1/Tcl/bin
> >       /cygnus/cygwin-B20/H-i586-cygwin32/bin
> >       /Perl/bin
> >       /enscript
> >       /jdk1.1.7A/bin
> >       /Cygnus/SN405/bin
> >       /Program Files/Mts
> >       /Sybase/DLL
> >       /Sybase/BIN
> >       /sybtools/WIN32
> >       /sybtools/ASEP
> >       /NTReskit
> >       //U/transact/Toolshed/LOCAL/common/bin
> >       //U/transact/Toolshed/LOCAL/cnt_40/bin
> 8<
>
> You're confusing the cygwin product with multiple paths to the
> product.  Secondly the /Cygnus/SN405/bin points to the first release
> of version b20 which was buggy.
>
> Clean up the PATH environment variable so that it is included only as
> the first element of the PATH.  If after doing this you still have
> problems resubmit the cygcheck -s -v -r output.
> ==
> -                        \\||//
> -------------------o0O0--Earnie--0O0o-------------------
> --                [email-masked]               --
> -- http://www.freeyellow.com/members5/gw32/index.html --
> ----------------------ooo0O--O0ooo----------------------
>
> PS: Newbie's, you should visit my page.
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com

Cygnus Win95/NT Configuration Diagnostics
Current System Time: Tue Mar 02 14:32:42 1999

WinNT Ver 4.0 build 1381 Service Pack 3

Path:	/cygnus/CYGWIN~1/H-I586~1/bin
	/batch
	/WINNT/system32
	/WINNT

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

CYGWIN = `tty'
HOME = `/home'
MAKE_MODE = `unix'
PWD = `/transact/AVP'

!C: = `C:\Home'
CLASSPATH = `c:\sybtools\ASEP\Monclass.zip;c:\sybtools\ASEP\3pclass.zip;'
COMPUTERNAME = `FELACO-1'
COMSPEC = `C:\WINNT\system32\cmd.exe'
CVSROOT = `cfelaco@mother:/omi/proj/master'
EXPORTS_ROOT = `//gravity/exports'
HISTFILE = `/home/.sh_history_22175'
HISTSIZE = `256'
HOMEDRIVE = `U:'
HOMEPATH = `\'
HOMESHARE = `\\brl-fsoffice-1\Felacoc$'
HOSTNAME = `felaco-1'
HOSTTYPE = `i586'
INCLUDE = `c:\program files\devstudio\vc\include;c:\program files\devstudio\vc\atl\include;c:\program files\devstudio\vc\mfc\include;C:\Program Files\Mts\Include'
LIB = `c:\program files\devstudio\vc\lib;c:\program files\devstudio\vc\mfc\lib;C:\Program Files\Mts\Lib;c:\sybase\LIB'
LOCAL_EXPORTS = `U:/transact'
LOGONSERVER = `\\BRL-DHCPRELAY-2'
MACHTYPE = `i586-pc-cygwin32'
MKSROOT = `C:\MKS'
NTRESKIT = `C:\NTReskit'
NUMBER_OF_PROCESSORS = `1'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
OS = `Windows_NT'
OSTYPE = `cygwin32'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
PLATFORM = `cnt_40'
PLATFORM_CLASS = `WINDOWS'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 5 Stepping 1, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0501'
PROMPT = `$P$G'
PS1 = `[1m[${cwd:-$PWD}][m  \n\#$ '
ROOTDIR = `C:/MKS'
SHELL = `/bin/sh'
SHLVL = `1'
SN_INSTALL_DIR = `C:\Cygnus\SN405'
SYBASE = `C:\Sybase'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
SYSTEM_ROOT = `c:\winnt'
TEMP = `C:\TEMP'
TERM = `cygwin'
TMP = `C:\TEMP'
TMPDIR = `C:/TEMP'
USERDOMAIN = `OPENMARKET'
USERNAME = `Chris.Felaco'
USERPROFILE = `C:\WINNT\Profiles\chris.felaco'
WINDIR = `C:\WINNT'
_ = `/cygnus/CYGWIN~1/H-I586~1/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
  (default) = `\\.\tape1:'
  unix = `/dev/st1'
  fbinary = 0x00000000
  fsilent = 0x00000001
  fmixed = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
  (default) = `\\.\tape0:'
  unix = `/dev/st0'
  fbinary = 0x00000000
  fsilent = 0x00000001
  fmixed = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
  (default) = `\\.\b:'
  unix = `/dev/fd1'
  fbinary = 0x00000000
  fsilent = 0x00000001
  fmixed = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
  (default) = `\\.\a:'
  unix = `/dev/fd0'
  fbinary = 0x00000000
  fsilent = 0x00000001
  fmixed = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
  (default) = `C:'
  unix = `/'
  fbinary = 0x00000000
  fsilent = 0x00000000
  fmixed = 0x00000000
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus\Cygwin32 Beta 19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus\Cygwin32 Beta 19\B19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus\Source-Navigator
  (default) = `4.0.5'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus\Source-Navigator\4.0.5
  (default) = `0'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin B20
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin B20\B20.1
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32\i586-cygwin32
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32\i586-cygwin32\cygwin-B20.1
  (default) = `c:\cygnus\cygwin-b20'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Source Navigator 4.0.5
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Source Navigator 4.0.5\4.0.5
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cygnus Cygwin B20
  (default) = `C:\WINNT\IsUninst.exe -fc:\cygnus\cygwin-b20\Uninst.isu'
  DisplayName = `Cygwin B20'

a:\ fd           N/A    N/A                    
c:\ hd  NTFS    6032Mb  39% CP CS UN PA FC     
d:\ hd  NTFS     117Mb   9% CP CS UN PA FC     
e:\ cd           N/A    N/A                    
h:\ net NTFS   52063Mb  27% CP CS UN PA FC     
j:\ net NTFS   46022Mb  39% CP CS UN PA FC     Exports Mirror
m:\ net Samba   4063Mb  22% CP    UN           exports
s:\ net Samba   4063Mb  61% CP    UN           gstevens
u:\ net Samba   4063Mb  61% CP    UN           cfelaco

C:          /         native  text!=binary
\\.\a:      /dev/fd0  native  text!=binary
\\.\b:      /dev/fd1  native  text!=binary
\\.\tape0:  /dev/st0  native  text!=binary
\\.\tape1:  /dev/st1  native  text!=binary

Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\bash.exe
Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\cat.exe
Not Found: cpp (good!)
Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\find.exe
Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\gcc.exe
Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\gdb.exe
Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\ld.exe
Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\ls.exe
Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\make.exe
Found: C:\cygnus\CYGWIN~1\H-I586~1\bin\sh.exe

  371k 1998/12/01 C:\cygnus\CYGWIN~1\H-I586~1\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=1998/12/1 3:25
    5k 1998/12/01 C:\cygnus\CYGWIN~1\H-I586~1\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 1998/12/01 C:\cygnus\CYGWIN~1\H-I586~1\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=1998/12/1 3:25
  600k 1998/12/01 C:\cygnus\CYGWIN~1\H-I586~1\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=1998/12/1 3:28
  446k 1998/12/04 C:\cygnus\CYGWIN~1\H-I586~1\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=1998/12/3 23:39
Use -h to see help about each section
#!/bin/sh

count=1
while true; do
   eval ENVVAR$count=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
   eval export ENVVAR$count
   env | wc -c || break
   count=`expr $count + 1`
done
--
Want to unsubscribe from this list?
Send a message to [email-masked]