On Wed, May 2, 2018 at 9:42 PM, Kyle Evans <[email protected]> wrote: > Author: kevans > Date: Thu May 3 02:42:13 2018 > New Revision: 333192 > URL: https://svnweb.freebsd.org/changeset/base/333192 > > Log: > fcntl(2): Vaguely document that ENOTTY is possible, with light examples > > Reported by: vs (2006, FreeBSD 6.1-BETA3) > Reported by: me (2018, angry debugging session)
I guess I should be more specific here- this specific angry debugging session was in net/freerdp's usage of devel/libepoll-shim. An apparently common pattern is: timer = timerfd_create(...); ... fcntl(timer->fd, F_SETFL, O_NONBLOCK); This fcntl(2) call will fail and result in an ENOTTY, because libepoll-shim's implementation of timerfd_create is a wrapper around kqueue and this isn't an OK thing to do. This was the inspiration of one of the specifically mentioned examples. epoll API provides a way to set NONBLOCK in the creation process, the use of which in lieu of the timerfd_create ... fcntl pattern ended up being the proper fix. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
