poll.h(0P)
β¨ poll.h β¨ β the POSIX glow-up π
okay bestie, we're diving into poll.h, straight out of the POSIX Programmer's Manual (that's the 0P in the header, iykyk). Buckle up, this one's short but it's load-bearing. π«Ά
πΈ PROLOG πΈ
so like, real talk first: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so pls consult the corresponding Linux manual page for the deets on Linux behavior), or the interface may not be implemented on Linux at all. Not me warning you before you commit π
π NAME π
poll.h β definitions for the poll() function. That's the whole job. She's a header. She contains multitudes. β¨
π SYNOPSIS π
#include <poll.h>
that's it. that's the line. slay. π
π¦ DESCRIPTION π¦
okay so the <poll.h> header shall define the pollfd structure, and it shall include at least these members:
int fd The following descriptor being polled.
short events The input event flags (see below).
short revents The output event flags (see below).
input flags go in events, output flags come back in revents. that's the whole vibe. π
The <poll.h> header shall define the following type through typedef:
nfds_tβ an unsigned integer type used for the number of file descriptors. (she counts. she's the count girlie. π’)
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. portable girlies, take note π
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. π₯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.POLLWRBANDβ Priority data may be written.POLLERRβ An error has occurred (reventsonly). πPOLLHUPβ Device has been disconnected (reventsonly). πͺ«POLLNVALβ Invalidfdmember (reventsonly). π«
ngl therevents-only ones are the ones that show up uninvited. You didn't ask for them inevents. They just arrive. main character energy fr.
The significance and semantics of normal, priority, and high-priority data are file and device-specific. So like, don't @ me, @ your driver. π«
The following shall be declared as a function and may also be defined as a macro. A function prototype shall be provided.
int poll(struct pollfd [], nfds_t, int);
iconic signature. no notes. π
The following sections are informative. (aka: the chill ones, no requirements here bestie)
π APPLICATION USAGE π
None.
(yeah. she said nothing. respect. π)
π§ RATIONALE π§
None.
(also nothing. a queen of restraint. β¨)
β FUTURE DIRECTIONS β
None.
(no plans, no drama, no roadmap. she's at peace. πΈ)
π₯ SEE ALSO π₯
- The System Interfaces volume of POSIX.1β2017,
confstr(),poll() - The Shell and Utilities volume of POSIX.1β2017,
getconf
go read those, bestie, they're the sequel π
π 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, and honestly? she ate. no crumbs. periodt. π π¦π
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms