delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/24/09:13:23

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
Message-ID: <430C7019.4070307@byu.net>
Date: Wed, 24 Aug 2005 07:03:21 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Unable to access forced mounts from /bin/sh
References: <Pine DOT GSO DOT 4 DOT 61 DOT 0508210147050 DOT 16057 AT slinky DOT cs DOT nyu DOT edu> <4309C081 DOT 9030400 AT byu DOT net>
In-Reply-To: <4309C081.9030400@byu.net>
X-IsSubscribed: yes

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

According to Eric Blake on 8/22/2005 6:09 AM:
>>>Huh?  Strace shows that sh fails when trying to stat /a.  Does this,
>>>perhaps, have something to do with bash switching to POSIX mode when
>>>invoked as "sh"?
> 
> Yes it does.  I'll have to look into bash POSIX mode further, and decide
> why cd only stat's intermediate paths in POSIX mode, to see if it warrants
> a patch to bash.

Sure enough, on 'cd -L', bash always checks for the existance of the
entire path, then checks for posixly_correct, then tries chdir(); so bash
succeeds where sh fails when an intermediate path name didn't exist.  A
patch will be provided in bash-3.0-12 whereby if chdir() can succeed even
though intermediate components don't exist, then bash will allow it even
in posix mode.  My understanding of cygwin is that since //, /proc, and
/cygdrive always exist, and /dev has no subdirectories (and in the latest
snapshot, even /dev exists - thanks cgf!), the only time chdir(dir) can
succeed when stat(basename(dir)) fails is with 2-level forced mount points.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDDHAZ84KuGfSFAYARAqVqAJ4i1444fGOD/jdnIMP1MfWrjPwOGACeL5rL
OtyTgumkWizDra2iFnBCty0=
=IWFC
-----END PGP SIGNATURE-----

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019