diff --git a/man2/select.2 b/man2/select.2 index 08b2ae537..44ed6eddf 100644 --- a/man2/select.2 +++ b/man2/select.2 @@ -73,9 +73,7 @@ Feature Test Macro Requirements for glibc (see _POSIX_C_SOURCE\ >=\ 200112L .SH DESCRIPTION .BR select () -and -.BR pselect () -allow a program to monitor multiple file descriptors, +allows a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become "ready" for some class of I/O operation (e.g., input possible). A file descriptor is considered ready if it is possible to @@ -92,39 +90,6 @@ can monitor only file descriptors numbers that are less than does not have this limitation. See BUGS. .PP -The operation of -.BR select () -and -.BR pselect () -is identical, other than these three differences: -.TP -(i) -.BR select () -uses a timeout that is a -.I struct timeval -(with seconds and microseconds), while -.BR pselect () -uses a -.I struct timespec -(with seconds and nanoseconds). -.TP -(ii) -.BR select () -may update the -.I timeout -argument to indicate how much time was left. -.BR pselect () -does not change this argument. -.TP -(iii) -.BR select () -has no -.I sigmask -argument, and behaves as -.BR pselect () -called with NULL -.IR sigmask . -.PP Three independent sets of file descriptors are watched. The file descriptors listed in .I readfds @@ -201,6 +166,46 @@ If is NULL (no timeout), .BR select () can block indefinitely. +.\" +.SS pselect() +.PP +The +.BR pselect () +system call allows an application to safely wait until either +a file descriptor becomes ready or until a signal is caught. +.PP +The operation of +.BR select () +and +.BR pselect () +is identical, other than these three differences: +.TP +(i) +.BR select () +uses a timeout that is a +.I struct timeval +(with seconds and microseconds), while +.BR pselect () +uses a +.I struct timespec +(with seconds and nanoseconds). +.TP +(ii) +.BR select () +may update the +.I timeout +argument to indicate how much time was left. +.BR pselect () +does not change this argument. +.TP +(iii) +.BR select () +has no +.I sigmask +argument, and behaves as +.BR pselect () +called with NULL +.IR sigmask . .PP .I sigmask is a pointer to a signal mask (see