Document a select() bug on Solaris 2.6.
authorBruno Haible <bruno@clisp.org>
Sat, 20 Dec 2008 19:44:55 +0000 (20:44 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 20 Dec 2008 19:45:40 +0000 (20:45 +0100)
ChangeLog
doc/posix-functions/select.texi
tests/test-select-in.sh

index 3c94385a8d54252cf7baa56a357ec65ce111e6ad..ad623c7f2fa8710e9dfcfcd1dc088cdf74d97a6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-20  Bruno Haible  <bruno@clisp.org>
+
+       * doc/posix-functions/select.texi: Mention Solaris 2.6 bug with
+       /dev/null.
+       * tests/test-select-in.sh: Likewise.
+       Reported by Tom G. Christensen <tgc@jupiterrise.com>.
+
 2008-12-20  Bruno Haible  <bruno@clisp.org>
 
        Don't pretend that Cygwin has a ja_JP.EUC-JP locale.
index 34896b9e6106ce70aa2a7a1adf91e78f2dafa0c9..a9aa263f0b43030839a3834d635bb2f44a624e24 100644 (file)
@@ -28,6 +28,10 @@ unmodified.
 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
index 8fd9d9c45c8515a4e413c2375a91de55c5e93b9b..13f6bbb8b2a867ed5fbe0442139a0544cb3373ee 100755 (executable)
@@ -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 @@ echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; }
 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