sys_select.h(7POSIX)
π sys_select.h β the POSIX Programmer's Manual, 7POSIX era π
okay bestie, welcome to the <sys/select.h> page from the POSIX Programmer's Manual, and before we even start I need you to know this:
π PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. π«Ά
β¨ NAME β¨
sys/select.h β select types. that's the whole vibe, it's a types header. π
πΈ SYNOPSIS πΈ
#include <sys/select.h>
π DESCRIPTION π
okay so this header is out here defining a whole little family of types for you, no cap. here's the roster:
The <sys/select.h> header shall define the timeval structure, which shall include at least the following members:
time_t tv_sec Seconds.
suseconds_t tv_usec Microseconds.
The <sys/select.h> header shall define the time_t and suseconds_t types as described in <sys/types.h>. π
The <sys/select.h> header shall define the sigset_t type as described in <signal.h>. β¨
The <sys/select.h> header shall define the timespec structure as described in <time.h>. β°
The <sys/select.h> header shall define the fd_set type as a structure. ποΈ
The <sys/select.h> header shall define the following symbolic constant, which shall have a value suitable for use in #if preprocessing directives:
FD_SETSIZEβ Maximum number of file descriptors in anfd_setstructure. π
The following shall be declared as functions, defined as macros, or both. If functions are declared, function prototypes shall be provided.
void FD_CLR(int, fd_set *);
int FD_ISSET(int, fd_set *);
void FD_SET(int, fd_set *);
void FD_ZERO(fd_set *);
β οΈ bestie listen. If implemented as macros, these may evaluate their arguments more than once, so applications should ensure that the arguments they supply are never expressions with side-effects. not me warning you about side effects in macro args π
The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.
int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
const struct timespec *restrict, const sigset_t *restrict);
int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
struct timeval *restrict);
Inclusion of the <sys/select.h> header may make visible all symbols from the headers <signal.h> and <time.h>. π¦ (surprise, you get extra symbols for free, that's giving bonus content)
The following sections are informative. π
π APPLICATION USAGE π
None. literally nothing here, it's iconic in its emptiness π
π§ RATIONALE π§
None. again nothing, we love a low-effort section β¨
π FUTURE DIRECTIONS π
None. the future? empty. slay π
π SEE ALSO π
<signal.h><sys_time.h><sys_types.h><time.h>- The System Interfaces volume of POSIX.1β2017,
pselect()
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie π this one came to you from IEEE/The Open Group, dated 2017, and it's filed under sys_select.h(7POSIX). go forth and FD_ZERO responsibly π«Άβ¨
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms