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


On Aug 22 21:48, nu774 wrote:
> Hi,
> 
> It seems that getcwd() of bash continues the following approach
> until it reaches /.
> 
> 1) readdir() on the parent directory.
> 2) for each dirent returned by readdir(), find the entry that
> matches the current dirctory (by comparing inode or something).
> 3) set parent dir as current, and continue from 1).
> 
> When you call getcwd() not under / (that is, C:/cygwin64), say
> /c/foo/bar (here I assume C drive is mounted on /c), step 2) will
> fail when current is /c, since readdir() on / doesn't return c as a
> dirent.
> 
> In short, getcwd() of bash doesn't work as expected in this
> situation, and if Cygwin's getcwd() implementation complies
> requirement by bash, HAVE_GETCWD should be enabled.
> As far as I can see, HAVE_GETCWD enabled bash.exe is working fine here.

Since our bash maintainer Eric is currently extremly busy, I took a stab
at it and created a new bash-4.1.11-2 64-bit package.  It picked up the
Cygwin getcwd and didn't have the reported problem in my quick test.

Please give it a try as soon as it hits your favorite mirror.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpDp_2kDZCdo.pgp
Description: PGP signature


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