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 Igor Pechtchanski on 8/20/2005 11:57 PM:
> Here's something weird.  I don't know whether this is a problem with the
> latest Cygwin, or bash:

I don't know if 2-level forced directories would/should ever work.  If /a
doesn't exist, then should a forced mount point at /a/b really be
simulating the existance of both a and b?  Would /a then be treated as a
read-only file system virtual directory until such time as you actually
'mkdir /a'?  Maybe a better solution is to make 'mount -f' require that
'dirname path' exist, so that only 'basename path' is forced.

On the other hand, what if the user does:
$ mkdir /a
$ mount -u -f c: /a/b
$ rmdir /a

This will take some thought and planning for cygwin1.dll and mount(1) to
get sane behavior in all cases.  Maybe the best solution for this case is
to have rmdir(2) to return EBUSY or ENOTEMPTY if the directory being
removed is currently hosting a forced mountpoint.

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

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

iD8DBQFDCcCB84KuGfSFAYARAmw/AJ9I9O0z+rVRbzRBl7VUSklUohCtgACgyt2E
Op16JwXe+OU+H5IicjUgA0o=
=hJwd
-----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]