Hello, I have detected two missing comments about the behaviour of select(2) system call, in the description of the select function in perlfunc.pod. Rafael Garcia-Suarez has already added one of these comments to the pod file in bleadperl (see perl-documentation mailling list archive for further information).
I'm attaching a patch to add the other missing comment to the same pod file (the one already patched by Rafael). Regards, Hernan A. Perez Masci.
--- perlfunc.pod 2005-04-07 10:12:49.000000000 -0300 +++ perlfunc.pod.patched 2005-04-08 14:55:29.000000000 -0300 @@ -4606,6 +4606,12 @@ On error, C<select> behaves like the select(2) system call : it returns -1 and sets C<$!>. +Note: on Linux, the select(2) system call may report a socket file +descriptor as "ready for reading", when actually no data is available, +thus a subsequent read blocks. It can be avoided using always the +O_NONBLOCK flag on the socket. See select(2) and fcntl(2) for further +details. + B<WARNING>: One should not attempt to mix buffered I/O (like C<read> or <FH>) with C<select>, except as permitted by POSIX, and even then only on POSIX systems. You have to use C<sysread> instead.