Is it considered to be ok to not check the return code of close(2) in base?
Eugene Grosbein
eugen at grosbein.net
Mon Jan 8 16:18:04 UTC 2018
08.01.2018 23:13, Eric van Gyzen wrote:
> Right, which is the reason such bugs are hard to diagnose. Optionally
> killing the process on close->EBADF would help find buggy code when
> another thread did NOT re-open the file descriptor between the two close
> calls.
Wouldn't "close(f); assert(errno != EBADF);" be better?
More information about the freebsd-hackers
mailing list