select(3)
DESCRIPTION
Selects readable, writable, and exceptional descriptors through the native parked readiness operation. The three sets are replaced with the descriptors that became ready.
SYNOPSIS
#include <sys/select.h> int select(int count, fd_set *read_set, fd_set *write_set, fd_set *except_set, struct timeval *timeout);
RETURN VALUE
- Returns the number of set members reported ready, or -1 and sets errno.
ERRORS
-EINVAL- Count is negative, exceeds FD_SETSIZE, or timeout has an invalid field.
-ENOMEM- The temporary readiness array cannot be allocated.
NOTES
This is a small POSIX wrapper over poll(3); it preserves Astia's blocking and wakeup semantics without busy polling.