7 ms·
> No new code should be using select(). Using it assumes the execution environment keeps all file descriptor values within FD_SETSIZE. What should we use inste
by Unklejoe 5y ago
> No new code should be using select(). Using it assumes the execution environment keeps all file descriptor values within FD_SETSIZE.
What should we use instead? poll()?
- johnny22 5y agothat's indeed one of the choices from the article itself.
- Unklejoe 5y agoI remember reading somewhere that poll was just a wrapper for select. I’m guessing that’s either outdated or false now.
- cesarb 5y agoIt's correct but outdated: according to https://man7.org/linux/man-pages/man2/poll.2.html#VERSIONS https://man7.org/linux/man-pages/man2/poll.2.html#VERSIONS "The poll() system call was introduced in Linux 2.1.23. On older kernels that lack this system call, the glibc poll() wrapper function provides emulation using select(2)." So as long as you use a Linux kernel made this century, you will be fine.
- friend-monoid 5y agoepoll.