delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
From: | ericblake AT comcast DOT net (Eric Blake) |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Bash login breaks if too many environment variables are set |
Date: | Fri, 16 Sep 2005 17:00:05 +0000 |
Message-Id: | <091620051700.16019.432AFA150000B34B00003E9322007456720A050E040D0C079D0A@comcast.net> |
> > > >I don't think all places in Windows have the limitation. > > Look at the code. We're inspecting a buffer returned from > GetEnvironmentStrings. That is a windows function. The very first > things returned from this are garbage. OK, I stand corrected. $ /bin/env | wc -c 34664 $ cmd bash: /cygdrive/c/WINNT/system32/cmd: Invalid argument $ strace /bin/env bash: /usr/bin/strace: Invalid argument On the other hand, POSIX would claim that this usage should be failing with E2BIG, not EINVAL. So it looks like Windows does have a hard limit at total environment size of 32k (in spite of their documentation never mentioning it), but that cygwin could do better at reporting the error when trying to invoke a native process. -- Eric Blake -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |