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
inefciently.
The time limit value specied 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 le descriptor bits in all the le descriptor sets. When an error
occurs, the value -1 is returned, and errno is set to indicate the error.
When the time limit specied 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 le descriptor sets pointed to by the readfds, writefds, and
errorfds parameters remain unmodied.
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 le descriptor specied by its fd parameter is set in
the le 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 specied le descriptor sets is invalid. One of these conditions
occurred:
The invalid le descriptor set contains a le descriptor for a le that is
not open.
The invalid le descriptor set contains a le descriptor that identies an
AF_INET AF_INET6 socket, but the current processor is not running a
transport agent process to support the socket. The le descriptor can
only be closed.
[EINTR] A signal was delivered before the time limit specied by the timeout parameter
expired and before any of the selected events occurred.
[EINVAL] One of these conditions occurred:
The value specied for the nfds parameter is less than 0 (zero) or greater
than FD_SETSIZE.
The time limit specied by the timeout parameter is invalid. One of its
components is negative or too large.
[ENETDOWN]
One of the specied le descriptors species a le on a remote HP NonStop
node, but communication with the remote node has been lost.
[ENOTSUP] One of the specied le descriptors refers to a terminal device le 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 le-system error number.
See the Guardian Procedure Errors and Messages Manual for more information about a specic
Guardian le-system error.
78 Hewlett-Packard Company 527186-003