Date: Wed, 24 Sep 1997 14:40:01 -0700 (PDT) From: "Arne Henrik Juul" <arnej@math.ntnu.no> To: freebsd-bugs Subject: Re: bin/4585: termcap search fails too early Message-ID: <199709242140.OAA29627@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/4585; it has been noted by GNATS. From: "Arne Henrik Juul" <arnej@math.ntnu.no> To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/4585: termcap search fails too early Date: Wed, 24 Sep 1997 23:32:37 +0200 On Sep 20, 13:19, J Wunsch wrote: > Why would it be wrong to make it continue only in the ENOENT and > EACCES? Maybe ELOOP, too. Something like EMFILE or ENFILE should for > sure be treated as an error in the first place. For simplicity, I think just continuing is best; if there's a "permanent" error like EMFILE it will happen again on the next file tried so the correct error code will get returned. On Solaris open(2) lists 20 possible error codes, and the only ones where I can see a real advantage in returning the error without trying the other possible pathnames are EFAULT and ENAMETOOLONG, all the others are either "there was something wrong with this pathname but one of the others could be better" or "some resource shortage which most probably will happen again with the same errno on the other pathnames". Of course, my immediate problem would be solved by just adding EACCES, but I'd hate to leave even more rare instances of this problem for later. (Like EISDIR or maybe ENXIO?) Especially since this is a general routine (not just for termcap) which might be used in more demanding circumstances, and I think it desirable to have the rules as simple as possible. It's not a very big matter to me however. - Arne H. J. (sorry for my late answer)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709242140.OAA29627>