Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Dec 2017 10:19:34 -0800
From:      Yuri <yuri@rawbw.com>
To:        Freebsd hackers list <freebsd-hackers@FreeBSD.org>
Subject:   Is it considered to be ok to not check the return code of close(2) in base?
Message-ID:  <24acbd94-c52f-e71a-8a96-d608a10963c6@rawbw.com>

next in thread | raw e-mail | index | archive | help
Some base utilities sometimes close files that they open for their 
purposes without checking the error code of close(2).

Is this considered to be ok, because it's just a close call and we are 
done with that file descriptor, or is it considered to be more 
appropriate to check close's error code?

Maybe there is some policy that covers this?

IMO, every system call's return value should be checked, just in case.


Yuri




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?24acbd94-c52f-e71a-8a96-d608a10963c6>