Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
select(2) OSS System Calls Reference Manual
NAME
select - Selects among file descriptors for synchronous input/output multiplexing
LIBRARY
G-series native Guardian processes: system library
G-series native OSS processes: system library
H-series and J-series native Guardian processes: implicit libraries
H-series and J-series OSS processes: implicit libraries
32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/yputdll
SYNOPSIS
#include <sys/time.h>
int select(
int nfds,
fd_set *readfds,
fd_set *writefds,
fd_set *errorfds,
struct timeval *timeout);
void FD_CLR(
int fd,
fd_set *fdset);
int FD_ISSET(
int fd,
fd_set *fdset);
void FD_SET(
int fd,
fd_set *fdset);
void FD_ZERO(
fd_set *fdset);
PARAMETERS
nfds Specifies the range of open file descriptors that might be ready for reading or
writing or that have exceptions pending. The select() function tests file descrip-
tors in the range of 0 (zero) through nfds -1.
The nfds parameter cannot be greater than FD_SETSIZE.
readfds Points to a file descriptor set consisting of file descriptors of objects opened for
reading. When the function is called, this file descriptor set specifies file descrip-
tors to be checked for being ready to read. Upon return from a successful call,
this file descriptor set specifies file descriptors that are ready to be read.
writefds Points to a file descriptor set consisting of file descriptors for objects opened for
writing. When the function is called, this file descriptor set specifies file descrip-
tors to be checked for being ready to write. Upon return from a successful call,
this file descriptor set specifies file descriptors that are ready to be written.
7−8 Hewlett-Packard Company 527186-023