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: find assert


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

According to Corinna Vinschen on 1/11/2009 2:16 AM:
>> To some degree, it is a cygwin bug, when "n" points to "//nowhere".  If
>> stat("n",&st) were to fail with the standardized ENOENT, rather than the
>> cygwin-specific ENOSHARE, then fts_read would have set fts_info to
>> FTS_SLNONE (a dangling symlink) rather than FTS_NS (stat failed, possibly
>> from ELOOP).
> 
> Are you proposing that Cygwin should change setting errno from ENOSHARE
> to ENOENT?  ENOSHARE is only set in one single instance and is only
> explicitly requested in another.  AFAICS, dropping ENOSHARE entirely
> would only simplify the code and should have no negative consequences
> (knock on wood here).

Changing from ENOSHARE to ENOENT would certainly be more POSIX-compliant -
the error is conveying the information that a path does not exist.  Also,
if you put some historical context on the problem, ENOSHARE predates the
implementation of the // namespace.  Back when //server did not represent
a valid path name, it made sense to have a different error for
//nosuch/share seeing as how //nosuch could never resolve on its own.  But
now that //nosuch can potentially resolve, it makes sense to treat it like
any other path name that can potentially resolve, by returning ENOENT.

However, I discovered that find still has a bug, whether or not we change
away from using ENOSHARE; the assert was also reproducible in this situation:

$ mkdir example
$ ln -s loop example/loop
$ find -L example

- --
Don't work too hard, make some time for fun as well!

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

iEYEARECAAYFAklqBnMACgkQ84KuGfSFAYCztQCgo/d7I4lDUrppbl7AowdEJDV8
K14An2zZoXXEDAH9Q1xbof0AgqxLfK1t
=deOC
-----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]