select.2: Place the discussion of the self-pipe technique in a headed subsection

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-02-18 12:02:41 +01:00
parent 73e8f3b4c1
commit d221e421a5
1 changed files with 11 additions and 10 deletions

View File

@ -497,6 +497,17 @@ Portable programs may wish to check for
and loop, just as with
.BR EINTR .
.PP
Under glibc 2.0,
.I <sys/select.h>
gives the wrong prototype for
.BR pselect ().
Under glibc 2.1 to 2.2.1, it gives
.BR pselect ()
when
.B _GNU_SOURCE
is defined.
.\"
.SS The self-pipe trick
On systems that lack
.BR pselect (),
reliable (and more portable) signal trapping can be achieved
@ -509,16 +520,6 @@ in the main program.
(To avoid possibly blocking when writing to a pipe that may be full
or reading from a pipe that may be empty,
nonblocking I/O is used when reading from and writing to the pipe.)
.PP
Under glibc 2.0,
.I <sys/select.h>
gives the wrong prototype for
.BR pselect ().
Under glibc 2.1 to 2.2.1, it gives
.BR pselect ()
when
.B _GNU_SOURCE
is defined.
.\"
.SS Emulating usleep(3)
.PP