X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=Yfrrep77/u0WOlnmo14Id8yWP4W76+HM9Hpx4yfof13
	U6NtJ2b/qiqloRO+VHwPoVJWAFnNyhFhB20Ss9o+tgCOSIvcohm0duYv5Ba9XBSl
	u7u73Gy1XRoVZ/XUS9QV5/Hn2OpoCrQgmb3SnbOQBS/AGwmRUgAKc4uJJ6y/WbNk
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=sb75uMa5D4vIzxe3G3roMgvB8C8=; b=AEFEqipB7k+pcXUR4
	StUSNYZbba6bJgMnAGMXmtuHEsX4Qgue99d9ppYlEEAorO0jFMbw2PFxOSzp95ax
	UHLC1OyO4dUh/bvSPJZWlg0qPTZB+DhRcbqyodp/5WSlbSPpK7S3NL2DUD73NKyo
	rUsGwwir3RVcmMoy2bM+vqfRQA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_PGP_INLINE,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.2
X-Received: by 10.112.156.166 with SMTP id wf6mr11190807lbb.13.1377170958516;        Thu, 22 Aug 2013 04:29:18 -0700 (PDT)
Message-ID: <5215F60C.7060805@gmail.com>
Date: Thu, 22 Aug 2013 15:29:16 +0400
From: LRN <lrn1986@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Thunderbird/26.0a1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: shell-init: error retrieving current directory
References: <521571A7.6010503@gmail.com> <521575A1.6020304@gmail.com> <20130822111058.GK2562@calimero.vinschen.de>
In-Reply-To: <20130822111058.GK2562@calimero.vinschen.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

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

On 22.08.2013 15:10, Corinna Vinschen wrote:
> On Aug 22 06:21, LRN wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 22.08.2013 06:04, nu774 wrote:
>>> Hi, I've experienced the same issue. From what I can see:
>>> Current bash.exe of cygwin64 seems to be improperly built with
>>> HAVE_GETCWD disabled, which result in using it's own getcwd
>>> implementation in the bash source package.
>> 1) It's not improperly disabled. Cygwin's getcwd does not behave the way
>> bash wants it to (when called with 0 buffer and 0 buffer length, it
>> fails, instead of allocating buffer). At least that is my understanding
>> after observing the source code.
> 
> That's not the case.  getcwd(NULL, 0) allocates a buffer via malloc,
> as on Linux.

Ah, yes. I've missed the fact that ulen is unsigned, so ulen = -1 is a
positive value.

- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSFfYKAAoJEOs4Jb6SI2CwxFgIAJHfVlfWkh+wqNRF9TaMZHTT
LiregOiZl5VqqDpPmS+Y6p6F57jG731yyHf7gGIdmItlJBQKtsgmPF1VnsPTQLpC
fKu3owHDk+jfHmX418ur5JuG66UQa2GM26B8cxXZuxEzchWSTBhdfcPgsCxouhVQ
I50WtAoWTllyS9kvKkJlaB/S6NHCiMgnxOuQDozwvcWasLrET4Zb/RZyNq5y22Qw
bAMWypGpWqS6H4oubxtntkIwZ9U1QKapQvtthRh9zI+aBRkcmL2mGZW8BO2jHHL+
ARcGDH4ua/KSDAdoLN20UWGVbzbT/sjzPcnt5g2mLKEBIRkffeIRDm0/RxxSFhU=
=+m3i
-----END PGP SIGNATURE-----

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

