1<sys/select.h>(0P)         POSIX Programmer's Manual        <sys/select.h>(0P)
2
3
4

NAME

6       sys/select.h - select types
7

SYNOPSIS

9       #include <sys/select.h>
10

DESCRIPTION

12       The  <sys/select.h>  header  shall  define  the  timeval structure that
13       includes at least the following members:
14
15
16              time_t         tv_sec      Seconds.
17              suseconds_t    tv_usec     Microseconds.
18
19       The time_t and suseconds_t types  shall  be  defined  as  described  in
20       <sys/types.h> .
21
22       The sigset_t type shall be defined as described in <signal.h> .
23
24       The timespec structure shall be defined as described in <time.h> .
25
26       The <sys/select.h> header shall define the fd_set type as a structure.
27
28       Each  of  the  following may be declared as a function, or defined as a
29       macro, or both:
30
31       void FD_CLR(int fd, fd_set *fdset)
32
33              Clears the bit for the file descriptor fd in the file descriptor
34              set fdset.
35
36       int FD_ISSET(int fd, fd_set *fdset)
37
38              Returns  a  non-zero value if the bit for the file descriptor fd
39              is set in the file descriptor set by fdset, and 0 otherwise.
40
41       void FD_SET(int fd, fd_set *fdset)
42
43              Sets the bit for the file descriptor fd in the  file  descriptor
44              set fdset.
45
46       void FD_ZERO(fd_set *fdset)
47
48              Initializes  the file descriptor set fdset to have zero bits for
49              all file descriptors.
50
51
52       If implemented as macros, these may evaluate their arguments more  than
53       once,  so applications should ensure that the arguments they supply are
54       never expressions with side effects.
55
56       The following shall be defined as a macro:
57
58       FD_SETSIZE
59
60              Maximum number of file descriptors in an fd_set structure.
61
62
63       The following shall be declared as functions and may also be defined as
64       macros. Function prototypes shall be provided.
65
66
67              int  pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
68                       const struct timespec *restrict, const sigset_t *restrict);
69              int  select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
70                       struct timeval *restrict);
71
72       Inclusion  of  the  <sys/select.h>  header may make visible all symbols
73       from the headers <signal.h>, <sys/time.h>, and <time.h>.
74
75       The following sections are informative.
76

APPLICATION USAGE

78       None.
79

RATIONALE

81       None.
82

FUTURE DIRECTIONS

84       None.
85

SEE ALSO

87       <signal.h>, <sys/time.h>, <sys/types.h>, <time.h>,  the  System  Inter‐
88       faces volume of IEEE Std 1003.1-2001, pselect(), select()
89
91       Portions  of  this text are reprinted and reproduced in electronic form
92       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
93       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
94       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
95       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
96       event of any discrepancy between this version and the original IEEE and
97       The  Open Group Standard, the original IEEE and The Open Group Standard
98       is the referee document. The original Standard can be  obtained  online
99       at http://www.opengroup.org/unix/online.html .
100
101
102
103IEEE/The Open Group                  2003                   <sys/select.h>(0P)
Impressum