Minix Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
SELECT(2)                     System Calls Manual                    SELECT(2)

       select,   FD_CLR,   FD_ISSET,   FD_SET,   FD_ZERO   -  synchronous  I/O

       #include <sys/select.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)

       Select examines  the  file  descriptors  given  in  the  sets  readfds,
       writefds,  and  errorfds,  up to and including file descriptor nfds-1 ,
       for reading, writing, or exceptional conditions, respectively.   Select
       currently  supports  regular  files,  pipes, named pipes, inet, and tty
       file descriptors (including pty).

       If the readfds argument is not a null pointer, it points to  an  object
       of  type  fd_set  that  on  input  specifies the file descriptors to be
       checked for being ready to read, and on  output  indicates  which  file
       descriptors are ready to read.  Writefds and errorfds have an analogous
       meaning for file descriptors to be checked for  being  ready  to  read,
       respectively have pending exceptional (error) conditions.

4th Berkeley Distribution         Jun 9, 2005                        SELECT(2)