# HG changeset patch # User Bruno Haible # Date 1229802295 -3600 # Node ID bafc6771d75a5aa39a85f0fce9ce4135b4082e65 # Parent 76fc4f6a3dea32a867e3dfa382772617d6cd38ba Document a select() bug on Solaris 2.6. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-20 Bruno Haible + + * doc/posix-functions/select.texi: Mention Solaris 2.6 bug with + /dev/null. + * tests/test-select-in.sh: Likewise. + Reported by Tom G. Christensen . + 2008-12-20 Bruno Haible Don't pretend that Cygwin has a ja_JP.EUC-JP locale. diff --git a/doc/posix-functions/select.texi b/doc/posix-functions/select.texi --- a/doc/posix-functions/select.texi +++ b/doc/posix-functions/select.texi @@ -28,6 +28,10 @@ On BeOS, @code{select} can only be called on descriptors created by the @code{socket} function, not on regular file descriptors. @item +On Solaris 2.6 and older, @code{select} applied to a file descriptor opened +for reading and associated with @code{/dev/null} hangs, waiting for input, +when instead it should return immediately. +@item On Linux, when some file descriptor refers to a regular file, @code{select} may fail, setting @code{errno} to @code{EBADF}. @end itemize diff --git a/tests/test-select-in.sh b/tests/test-select-in.sh --- a/tests/test-select-in.sh +++ b/tests/test-select-in.sh @@ -1,6 +1,9 @@ #!/bin/sh # Test select() on file descriptors opened for reading. +# This test is known to fail on Solaris 2.6 and older, due to its handling +# of /dev/null. + tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 @@ -23,6 +26,7 @@ test `cat t-select-in.tmp` = "1" || exit 1 # Special files. +# This part of the test is known to fail on Solaris 2.6 and older. rm -f t-select-in.tmp ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null