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: Unable to access forced mounts from /bin/sh


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

According to Eric Blake on 8/24/2005 7:03 AM:
> 
> 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.

I've uploaded a test version of bash, 3.0-12, that changes the behavior of
cd to use realpath() for -P, and to only check existance of the entire
path (rather than all intermediates) for -L, so that you should be able to
cd /a/b even in POSIX mode when /a doesn't exist but /a/b is a drive
mount.  This new version also implements the postinstall improvements -
using a shell script to set up a batch file without regards to whether
/bin/sh runs it, then using the bat file to force bash to run the real
postinstall script.  The postinstall script is now also run as part of
/etc/profile.d, so that even if setup.exe couldn't update /bin/sh, a
normal bash login might do so, hopefully reducing some of the complaints
on this list about /bin/sh disappearing.  Furthermore, the postinstall
checks timestamps first, and won't upgrade /bin/sh if it is newer than bash.

Because realpath() is buggy until 20050826 snapshot or later, and because
the postinstall script changed (and 01bash.bat is the first .bat in
/etc/postinstall), I marked 3.0-12 as test, and am not sending a release
announcement until cygwin 1.5.19 is finalized.

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

Eric Blake             ebb9@byu.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

iD8DBQFDFEzu84KuGfSFAYARAmA+AJ4/n8K8gnLTkax/lTxk1rwlD+JcHACfX9Xf
DLqIutXL4A666FyerPwHMs0=
=IuQl
-----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/


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