Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <445C57B81208C24EAD99F2944DBB9D29030212F8@BLNSS10A> From: Klein Andre ICM N AS PD B 3 To: "'cygwin AT cygwin DOT com'" Subject: RE: Cygwin/bash: need environment variables >32K Date: Wed, 22 Oct 2003 13:16:21 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C3988D.EC3590D0" Note-from-DJ: This may be spam ------_=_NextPart_000_01C3988D.EC3590D0 Content-Type: text/plain; charset="iso-8859-1" Thanks for your answer! I've tried to make the example more simple (s. attachments). It sets a long environment variable and simply invokes the cygwin rm executable afterwards... I open a DOS box and invoke the example with >bash run.sh Following problems arise in my environment: (a) environment variable with 30K run.sh: line 9: /usr/bin/rm: Resource temporarily unavailable (b) environment variable with 100K run.sh: line 9: /usr/bin/rm: Invalid argument (c) environment variable with 20K rm works fine So this clearly shows, that the length of my environment variable affects the execution of the cygwin "rm" executable. I hope you can reproduce this in your environment?! Is there any way to avoid these problems? Unfortunately we need such long variables... Andre -----Original Message----- From: Corinna Vinschen [mailto:corinna-cygwin AT cygwin DOT com] Sent: Mittwoch, 22. Oktober 2003 12:01 To: 'cygwin AT cygwin DOT com' Subject: Re: Cygwin/bash: need environment variables >32K On Wed, Oct 22, 2003 at 11:30:54AM +0200, Klein Andre ICM N AS PD B 3 wrote: > I need to set a very long environment variable CLASSPATH within Cygwin bash. > But there seems to be an upper limit of 32K for environment variables!?!? > > Is there any way to increase this upper limit? > > I have attached 2 small files for demonstrating the problem. > Start run.sh and the invocation of the executable (java) failes... It's not the length of the environment variable which is the problem, it's the way the application is called. java is a native windows application and on process creation, the windows command line can not exceed 32K. Does java not support the CLASSPATH environment variable? Do you need to give it as argument explicitely? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------_=_NextPart_000_01C3988D.EC3590D0 Content-Type: application/octet-stream; name="run.sh" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="run.sh" # Set environment and invoke "rm".=0A= # This causes various failures, depending on length of CLASSPATH.=0A= =0A= . ./setClasspath.sh=0A= =0A= #echo $CLASSPATH=0A= =0A= echo "proceed after setClasspath ..."=0A= rm -f /tmp/xxx=0A= echo "rm finished"=0A= ------_=_NextPart_000_01C3988D.EC3590D0 Content-Type: application/octet-stream; name="setClasspath.sh" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="setClasspath.sh" # Set a long environment variable CLASSPATH.=0A= =0A= CLASSPATH=3D=0A= LINE=3Dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=0A= =0A= # 10K=0A= #NUMBERS=3D"1"=0A= =0A= # 20K=0A= #NUMBERS=3D"1 2"=0A= =0A= # 30K=0A= NUMBERS=3D"1 2 3"=0A= =0A= # 100K=0A= #NUMBERS=3D"1 2 3 4 5 6 7 8 9 10"=0A= =0A= for n in $NUMBERS ; do=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= CLASSPATH=3D${CLASSPATH}";$LINE"=0A= done=0A= =0A= export CLASSPATH=0A= ------_=_NextPart_000_01C3988D.EC3590D0 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------_=_NextPart_000_01C3988D.EC3590D0--