poll.h(7POSIX)
πΈ PROLOG πΈ
okay so real talk bestie, this page is part of the POSIX Programmer's Manual. and like, the Linux implementation of this interface? it may differ β so if you're on Linux, go consult the corresponding Linux manual page for the deets, or honestly the interface might not even be implemented on Linux at all. vibe check accordingly π
β¨ NAME β¨
poll.h β definitions for the poll() function π¦
π SYNOPSIS π
#include <poll.h>
π DESCRIPTION π
so the <poll.h> header shall define the pollfd structure, and it shall include at least these members, no cap:
int fd The following descriptor being polled.
short events The input event flags (see below).
short revents The output event flags (see below).
and the <poll.h> header shall define the following type through typedef:
nfds_tβ an unsigned integer type used for the number of file descriptors. it's giving "how many fds are we even polling bestie" π«
the implementation shall support one or more programming environments in which the width of nfds_t is no greater than the width of type long. the names of these programming environments can be obtained using the confstr() function or the getconf utility. iykyk π
the <poll.h> header shall define the following symbolic constants, and zero or more of which may be OR'ed together to form the events or revents members in the pollfd structure:
POLLINβ data other than high-priority data may be read without blocking. periodt β¨POLLRDNORMβ normal data may be read without blocking.POLLRDBANDβ priority data may be read without blocking.POLLPRIβ high priority data may be read without blocking. π¨POLLOUTβ normal data may be written without blocking.POLLWRNORMβ equivalent toPOLLOUT. literally the same vibe π«ΆPOLLWRBANDβ priority data may be written.POLLERRβ an error has occurred (reventsonly). πPOLLHUPβ device has been disconnected (reventsonly). πPOLLNVALβ invalidfdmember (reventsonly). π
the significance and semantics of normal, priority, and high-priority data are file and device-specific. so like, don't @ me, it depends on the file/device bestie π
the following shall be declared as a function and may also be defined as a macro. a function prototype shall be provided. iconic behavior fr fr:
int poll(struct pollfd [], nfds_t, int);
the following sections are informative. π
πΈ APPLICATION USAGE πΈ
None. (yeah. nothing. not me expecting a whole essay π)
π¦ RATIONALE π¦
None. (same energy, empty bestie π )
β FUTURE DIRECTIONS β
None. (the future is literally blank, slay β¨)
π SEE ALSO π
- The System Interfaces volume of POSIX.1β2017,
confstr(),poll() - The Shell and Utilities volume of POSIX.1β2017,
getconf
π 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!! brought to you by IEEE/The Open Group, dated 2017 β the poll.h(7POSIX) era, and we ate π
β¨π
π¦ 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