(I hope this list is the right place for this)
I was browsing around for accept4 usage in Python and I saw it's already used internally in socket.accept (on Linux only), albeit it's not exposed, so accepting an incoming connection and setting it to be non-blocking takes 3 syscalls.
accept4 allows us to do this with a single syscall, and it made it into FreeBSD 10, so that's another system that could benefit from this optimization.
Would it be desirable to extend socket.accept to something like:
which would use accept4's flags on supported systems and fallback to regular fcntl on others?
The idea is to accept an incoming connection and make it non-blocking at the same time, asyncio and other frameworks would benefit from this by doing one function call and 2 syscalls less (on supported systems, that is).