STREAMS-UX Programmer's Guide (February 2007)
STREAMS Mechanism and System Calls
Polling Streams
Chapter 2
37
Differences Between select(2) and poll(2)
Unlike the pollfd structure that allows poll (2) to check a virtually unlimited number of file descriptors, the
select (2) call expects file descriptors to be specified as three sets of bitmasks.
In HP-UX, both functions allow the user process to perform more or less than same function. As select (2)
requires file descriptors to be specified as bitwise-ORs, it limits the number of file descriptors that can be
examined in one select (2) call. However, the programming overhead for select (2) is lower than poll (2), where
a pollfd structure must be initialized for each file descriptor. poll (2) is useful when a large number of files
are to be examined and millisecond-level timeout granularity is not a constraint.