The man page for select/pselect provides more info than your original link.
Suppose the signal handler sets a global flag and returns. Then a test of this global flag followed by a call of select() could hang indefinitely if the signal arrived just after the test but just before the call.
This is exactly what Perl does.
By contrast, pselect() allows one to first block signals, handle the signals that have come in, then call pselect() with the desired sigmask, avoiding the race.
Perl could do this. It could even use the self-pipe trick internally on systems that don't have pselect.
My machine supports pselect based on the presence of its man page, but strace shows neither pselect nor a pipe.
Feel free to submit a bug report.
|