man-pages/man0p/poll.h.0p

111 lines
3.0 KiB
Plaintext

.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
.TH "<poll.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
.\" <poll.h>
.SH NAME
poll.h \- definitions for the poll() function
.SH SYNOPSIS
.LP
\fB#include <poll.h> \fP
.SH DESCRIPTION
.LP
The \fI<poll.h>\fP header shall define the \fBpollfd\fP structure
that includes at least the following members:
.sp
.RS
.nf
\fBint fd \fP The following descriptor being polled. \fB
short events \fP The input event flags (see below). \fB
short revents \fP The output event flags (see below). \fB
\fP
.fi
.RE
.LP
The \fI<poll.h>\fP header shall define the following type through
\fBtypedef\fP:
.TP 7
\fBnfds_t\fP
An unsigned integer type used for the number of file descriptors.
.sp
.LP
The implementation shall support one or more programming environments
in which the width of \fBnfds_t\fP is no greater than the
width of type \fBlong\fP. The names of these programming environments
can be obtained using the \fIconfstr\fP() function or the \fIgetconf\fP
utility.
.LP
The following symbolic constants shall be defined, zero or more of
which may be OR'ed together to form the \fIevents\fP or
\fIrevents\fP members in the \fBpollfd\fP structure:
.TP 7
POLLIN
Data other than high-priority data may be read without blocking.
.TP 7
POLLRDNORM
Normal data may be read without blocking.
.TP 7
POLLRDBAND
Priority data may be read without blocking.
.TP 7
POLLPRI
High priority data may be read without blocking.
.TP 7
POLLOUT
Normal data may be written without blocking.
.TP 7
POLLWRNORM
Equivalent to POLLOUT.
.TP 7
POLLWRBAND
Priority data may be written.
.TP 7
POLLERR
An error has occurred ( \fIrevents\fP only).
.TP 7
POLLHUP
Device has been disconnected ( \fIrevents\fP only).
.TP 7
POLLNVAL
Invalid \fIfd\fP member ( \fIrevents\fP only).
.sp
.LP
The significance and semantics of normal, priority, and high-priority
data are file and device-specific.
.LP
The following shall be declared as a function and may also be defined
as a macro. A function prototype shall be provided.
.sp
.RS
.nf
\fBint poll(struct pollfd[], nfds_t, int);
\fP
.fi
.RE
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
None.
.SH RATIONALE
.LP
None.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
The System Interfaces volume of IEEE\ Std\ 1003.1-2001, \fIconfstr\fP(),
\fIpoll\fP(), the Shell and Utilities volume of IEEE\ Std\ 1003.1-2001,
\fIgetconf\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 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 .