5 ms·
One of the biggest and widely overlooked/unknown problems with select(2) is the size of the fd_set. If the file descriptor number is higher than fd_set's size (
by Bino 10y ago
One of the biggest and widely overlooked/unknown problems with select(2) is the size of the fd_set. If the file descriptor number is higher than fd_set's size (often 1024) you have a problem. (If you don't change it)
- dozzie 10y agoOn the other hand, file descriptor numbers that high are mainly encountered in programs that use plenty of descriptors, and this usually calls for poll(2) or even more OS-specific mechanisms (epoll/kqueue). But poll() has interface superior to select(), anyway.