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
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