On 2017/01/20 8:10, Nicholas Nethercote wrote:
There are lots
of functions where not checking the return value is reasonable, such as
close().

A file opened for writing and is buffered will flush pending data to disk upon Close() and may encounter the error such as disk full AT THAT POINT, and so the return value of
Close() MUST BE CHECKED for those cases.
[I am fighting to fix the issue since C-C TB fails to use buffered write which causes so much I/O overhead, but then I found the return value of Close() are not checked at all. Ugh... So I have to fix C-C TB to make it check the return value of Close() and take appropriate error reporting/recovery action before I can enable buffering. Very disappointing...]

A blanket statement above can put bad ideas in many people's mind :-(

Of course, if the "close()" above refers to POSIX close(), fine.

TIA


_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to