From 3fa2e4b9f55d5d00c6539dc4b124f9d844cac59b Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 31 Aug 2010 06:59:47 +0200 Subject: [PATCH] select.2: Update NOTES on old glibc pselect() Make it clear that modern glibc uses the kernel pselect() on systems where it is available. See https://bugzilla.kernel.org/show_bug.cgi?id=14411 Reported-by: mac@mcrowe.com Signed-off-by: Michael Kerrisk --- man2/select.2 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/man2/select.2 b/man2/select.2 index 1bba6b3c6..512471db5 100644 --- a/man2/select.2 +++ b/man2/select.2 @@ -35,7 +35,7 @@ .\" 2005-03-11, mtk, modified pselect() text (it is now a system .\" call in 2.6.16. .\" -.TH SELECT 2 2008-12-05 "Linux" "Linux Programmer's Manual" +.TH SELECT 2 2010-08-31 "Linux" "Linux Programmer's Manual" .SH NAME select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO \- synchronous I/O multiplexing @@ -427,15 +427,19 @@ that did not take a .I sigmask argument. -Since version 2.1, glibc has provided an emulation of +Starting with version 2.1, glibc provided an emulation of .BR pselect () -that is implemented using +that was implemented using .BR sigprocmask (2) and .BR select (). -This implementation remains vulnerable to the very race condition that +This implementation remained vulnerable to the very race condition that .BR pselect () was designed to prevent. +Modern versions of glibc use the (race-free) +.BR pselect () +system call on kernels where it is provided. + On systems that lack .BR pselect (), reliable (and more portable) signal trapping can be achieved