EBADF semantic is that the passed fd is invalid, not that it is of wrong type. Using EBADF in these places in kern_event.c and sys_procdesc.c give bad examples to copy from. Note that places in kern_event.c that checks KQ_CLOSING and return EBADF are kept, since KQ_CLOSING is the transient state before the fd is finally closed and become eligible for EBADF.
Details
Details
- Reviewers
markj - Commits
- rGfd9e09cb2ab0: kern: replace several EBADF with EINVAL
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable