Is it considered to be ok to not check the return code of close(2) in base?

Rodney W. Grimes freebsd-rwg at pdx.rh.CN85.dnsmgr.net
Mon Jan 1 16:53:02 UTC 2018


> On Mon, Jan 01, 2018 at 04:14:33PM +0000, Poul-Henning Kamp wrote:
> > But this is bikeshedding at this point anyway.
> 
> +1

Bike shedding is good, people learn things from it.  I never knew that
assert was altered by NDEBUG for example, thanks for that enlightenment
Mark.  Didnt even realize that assert had been bastardized by standards,
and phk is right, it predates all those things, probably by a decade or more.

In summary, given the original question, it would be in the
interest of the project to evaluate those close() calls that
do not check for errors and do something about it.

Either document the intent to intentionally ignore them,
or handle the error in some fasion.

-- 
Rod Grimes                                                 rgrimes at freebsd.org


More information about the freebsd-hackers mailing list