This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bash login breaks if too many environment variables are set


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Reid Thompson on 9/12/2005 5:15 PM:
> Hommersom, Fred wrote:
> 
>>
>> The file bigsetup.bat contains a huge amount environment variables.
>> For a medium number (~ 600) everything works fine
>> For a larger number the output is:
>> bash: /usr/bin/id: Resource temporarily unavailable
...
> i would think that you should declare your env variables in either your
> .bashrc or your .bash_profile rather than in a .bat file.  It may solve
> your problem.

I haven't had a chance to look at this further, but it is on my list.  I
tried looking in the Windows documentation to see if there is a limit on
environment size for CreateProcess that you might be exceeding - all I can
find is that an individual variable can be no more than 32k, but nothing
about the overall environment size.  Does anyone else know what limits
windows imposes on the environment?  POSIX only specifies ARG_MAX, which
is the combination of command line and environment together.

You might also want to experiment with 'export -p' in a bash where you are
experiencing failures, to see if bash's list of environment variables is
shorter than what you thought should have been inherited into bash.  Being
a builtin, it won't have then invocation problems like you are having with
id, find, or sort.  I also agree with Reid's suggestion - try sticking
things into the environment AFTER bash is started, not beforehand.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
volunteer cygwin bash maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDKCRA84KuGfSFAYARAtiUAJ9/7QwrUG1TFnoqaMX2VRJo/K8ATQCg1G+/
vkJkRCSGt6r1iKUGhp2tmvU=
=tPWq
-----END PGP SIGNATURE-----

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]