mount never fails ... sorta
Sun Jun 11 23:22:00 GMT 2006
> Richard Foulk wrote:
> > Give mount(1) nonexistent hosts or directories and it will complain,
> > but it still populates the mount table as if it succeeded.
> > It also always returns zero, for success or failure.
> Cygwin's mount is a different bird than on Unix. It really is just a mapping
> table of POSIX names to DOS or UNC-style paths. It is not required that the
> POSIX path exist for things to work. But since most people coming from a UNIX
> background expect that it does and it certainly helps things like shell
> path completion if the paths do already exist, you get a warning to let you
> know about this difference.
I guess I should have said mount's behavior is wrong and broken.
It knows when there's an error it just does the wrong things.
1. mount reports the error to stderr, but not via the return code.
2. mount knows about the error but signals success anyway -- by
listing a (non-existent) mount within the mount table.
Sure Cygwin's mount is different than Unix's. That's what Cygwin is all
about, hiding those differences. Cygwin's mount fails at that.
Registering a mount that doesn't exist is quite broken.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin