Bug 14411 - pselect man page Linux notes appear to be out of date
Summary: pselect man page Linux notes appear to be out of date
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-15 09:14 UTC by Mike
Modified: 2010-08-31 05:02 UTC (History)
1 user (show)

See Also:
Kernel Version:
Tree: Mainline
Regression: No


Attachments

Description Mike 2009-10-15 09:14:20 UTC
man-pages-3.23 man2/select.2 contains the following text in its BUGS section:

Since version 2.1, glibc has provided an emulation of pselect() that is implemented using sigprocmask(2) and select().  This implementation remains vulnerable to the very race condition that pselect() was designed to prevent.

It would appear that glibc added support in January 2006 for the real pselect syscall which presumably doesn't suffer from these race conditions.

References:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f72949f679df06021c9e43886c9191494fdb007
$glibc/sysdeps/unix/sysv/linux/pselect.c
$glibc/ChangeLog.16
Comment 1 Michael Kerrisk 2010-08-31 05:02:44 UTC
Mike,

thanks for the report. I agree the text should be clearer. I applied the following patch for man-pages-3.26.

Thanks,

Michael

--- a/man2/select.2
+++ b/man2/select.2
@@ -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

Note You need to log in before you can comment on or make changes to this bug.