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: shell-init: error retrieving current directory


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


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