Open System Services System Calls Reference Manual (G06.25+, H06.03+)
select(2) OSS System Calls Reference Manual
Specifying arbitrarily large values for the nfds parameter can cause the function to behave
inefficiently.
The time limit value specified by the timeout parameter has no effect on the operation of the
alarm() or settimer() function.
RETURN VALUES
Upon successful completion, the select() function returns the number of ready objects
represented by corresponding file descriptor bits in all the file descriptor sets. When an error
occurs, the value -1 is returned, and errno is set to indicate the error.
When the time limit specified by the timeout parameter expires, the select() function returns the
value 0 (zero), and all bits in the objects pointed to by the readfds, writefds, and errorfds parame-
ters are also set to 0 (zero).
When select() returns an error, the file descriptor sets pointed to by the readfds, writefds, and
errorfds parameters remain unmodified.
The FD_CLR, FD_SET, and FD_ZERO macros do not return values. The FD_ISSET macro
returns a nonzero value when the bit for the file descriptor specified by its fd parameter is set in
the file descriptor set pointed to by its fdset parameter; otherwise, the FD_ISSET macro returns 0
(zero).
ERRORS
If any of these conditions occurs, the select() function sets errno to the corresponding value:
[EBADF] One of the specified file descriptor sets is invalid. One of these conditions
occurred:
• The invalid file descriptor set contains a file descriptor for a file that is
not open.
• The invalid file descriptor set contains a file descriptor that identifies an
AF_INET AF_INET6 socket, but the current processor is not running a
transport agent process to support the socket. The file descriptor can
only be closed.
[EINTR] A signal was delivered before the time limit specified by the timeout parameter
expired and before any of the selected events occurred.
[EINVAL] One of these conditions occurred:
• The value specified for the nfds parameter is less than 0 (zero) or greater
than FD_SETSIZE.
• The time limit specified by the timeout parameter is invalid. One of its
components is negative or too large.
[ENETDOWN]
One of the specified file descriptors specifies a file on a remote HP NonStop
node, but communication with the remote node has been lost.
[ENOTSUP] One of the specified file descriptors refers to a terminal device file that does not
support nonblocking input/output and the descriptor was opened in
O_NONBLOCK mode. The HP implementation does not support this use of the
select() function.
For all other error conditions, errno is set to the appropriate Guardian file-system error number.
See the Guardian Procedure Errors and Messages Manual for more information about a specific
Guardian file-system error.
7−8 Hewlett-Packard Company 527186-003