1sys_select.h(0P)           POSIX Programmer's Manual          sys_select.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       sys/select.h — select types
13

SYNOPSIS

15       #include <sys/select.h>
16

DESCRIPTION

18       The <sys/select.h> header shall define  the  timeval  structure,  which
19       shall include at least the following members:
20
21
22           time_t         tv_sec      Seconds.
23           suseconds_t    tv_usec     Microseconds.
24
25       The <sys/select.h> header shall define the time_t and suseconds_t types
26       as described in <sys/types.h>.
27
28       The <sys/select.h> header shall define the sigset_t type  as  described
29       in <signal.h>.
30
31       The  <sys/select.h>  header  shall  define  the  timespec  structure as
32       described in <time.h>.
33
34       The <sys/select.h> header shall define the fd_set type as a structure.
35
36       The <sys/select.h> header shall define the following symbolic constant,
37       which  shall  have a value suitable for use in #if preprocessing direc‐
38       tives:
39
40       FD_SETSIZE  Maximum number of file descriptors in an fd_set structure.
41
42       The following shall be declared as functions,  defined  as  macros,  or
43       both. If functions are declared, function prototypes shall be provided.
44
45
46           void FD_CLR(int, fd_set *);
47           int  FD_ISSET(int, fd_set *);
48           void FD_SET(int, fd_set *);
49           void FD_ZERO(fd_set *);
50
51       If  implemented as macros, these may evaluate their arguments more than
52       once, so applications should ensure that the arguments they supply  are
53       never expressions with side-effects.
54
55       The following shall be declared as functions and may also be defined as
56       macros. Function prototypes shall be provided.
57
58
59           int  pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
60                    const struct timespec *restrict, const sigset_t *restrict);
61           int  select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
62                    struct timeval *restrict);
63
64       Inclusion of the <sys/select.h> header may  make  visible  all  symbols
65       from the headers <signal.h> and <time.h>.
66
67       The following sections are informative.
68

APPLICATION USAGE

70       None.
71

RATIONALE

73       None.
74

FUTURE DIRECTIONS

76       None.
77

SEE ALSO

79       <signal.h>, <sys_time.h>, <sys_types.h>, <time.h>
80
81       The System Interfaces volume of POSIX.1‐2017, pselect()
82
84       Portions  of  this text are reprinted and reproduced in electronic form
85       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
86       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
87       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
88       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
89       event of any discrepancy between this version and the original IEEE and
90       The  Open Group Standard, the original IEEE and The Open Group Standard
91       is the referee document. The original Standard can be  obtained  online
92       at http://www.opengroup.org/unix/online.html .
93
94       Any  typographical  or  formatting  errors that appear in this page are
95       most likely to have been introduced during the conversion of the source
96       files  to  man page format. To report such errors, see https://www.ker
97       nel.org/doc/man-pages/reporting_bugs.html .
98
99
100
101IEEE/The Open Group                  2017                     sys_select.h(0P)
Impressum