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:mime-version:date:message-id:subject:from:to
	:content-type; q=dns; s=default; b=U/aPCVNmVDSnfKSZcXqOeCKv6Xs3A
	8ZLsxKRpFuqwNDh03lZ9BNqnINq1XJB0mjnoYWdctMBpwkgQYIZ51v+YsdIGT+Xm
	Y88Fpj0HxQeWMItErZvGDlsF75o77SA8FvzZDN45NWOpgpeB/AXQbeHJOet5KxWT
	GEaA2xDUsWvX+s=
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:mime-version:date:message-id:subject:from:to
	:content-type; s=default; bh=HBuFLtwfclulRLuo0eaGChsfiG4=; b=CX/
	ivqN/h3zZWEfFGkKYJG6NPxLzAQk9TIj94wg4b2RQ2YZOP5QtR1rixoYcNcIuLDG
	sFVlsAz8xcbVw/QwH8/Gzxk7KUZRXA7y5oVdgfL5gZaH+j4SvJBAA5C4sO+wqCNh
	gXoWDV948B3NMj5RI+B/XItD0gOwUw/BE1Lq/MHc=
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=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.2
MIME-Version: 1.0
X-Received: by 10.180.84.196 with SMTP id b4mr652708wiz.19.1376650832368; Fri, 16 Aug 2013 04:00:32 -0700 (PDT)
Date: Fri, 16 Aug 2013 12:00:32 +0100
Message-ID: <CAHWeT-b80VyH382nXA2RrNmgK1jGOrFpw_t_zpJWEv7znR7pmA@mail.gmail.com>
Subject: shell-init: error retrieving current directory
From: Andy Koppe <andy.koppe@gmail.com>
To: Cygwin Tech List <cygwin@cygwin.com>
Content-Type: text/plain; charset=UTF-8

This might be the same issue as a couple of previous unresolved
reports with the same error message, but I'm not sure, so here's a new
thread.

Steps to reproduce:
- On Windows 7, install 64-bit Cygwin into C:\cygwin, and let it
create a desktop shortcut.
- Edit /etc/fstab to change the cygdrive prefix to /.
- Double click 'Cygwin64 Terminal' desktop shortcut.

Result: a bunch of errors before the bash prompt.

shell-init: error retrieving current directory: getcwd: cannot access
parent directories: Bad file descriptor
job-working-directory: error retrieving current directory: getcwd:
cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd:
cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd:
cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access
parent directories: No error

The errors remain if the shortcut target is changed from invoking
mintty to invoking bash directly: 'C:\cygwin\bin\bash.exe -l'.

The errors go away if 'C:\cygwin\bin' is put into the shortcut's
otherwise empty 'Start In' field. (But they stay if 'C:\' is put there
instead.)

They also go away if the cygdrive prefix is changed to anything but
the root directory.

I couldn't reproduce the issue with a 32-bit install.

Regards,
Andy

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

