From 48e7c1cff9531ce0fe05108ea7ec69f2d20472b5 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 13 Sep 2012 08:51:16 +0200 Subject: [PATCH] poll/select: document portability problems not fixed by Gnulib. * doc/posix-functions/poll.texi: poll does not work well on pipes under Windows. It has the same limitations as select on BeOS. * doc/posix-functions/select.texi: select does not work well on pipes under Windows. --- ChangeLog | 9 +++++++++ doc/posix-functions/poll.texi | 8 ++++++++ doc/posix-functions/select.texi | 4 ++++ 3 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 18225e4ff..ab09b0e64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-09-13 Paolo Bonzini + + poll/select: document portability problems not fixed by Gnulib. + * doc/posix-functions/poll.texi: poll does not work well on + pipes under Windows. It has the same limitations as select on + BeOS. + * doc/posix-functions/select.texi: select does not work well + on pipes under Windows. + 2012-09-10 Paul Eggert fcntl-h: check for AIX 7.1 bug with O_NOFOLLOW and O_CREAT diff --git a/doc/posix-functions/poll.texi b/doc/posix-functions/poll.texi index 1c3da5bb2..da619b99d 100644 --- a/doc/posix-functions/poll.texi +++ b/doc/posix-functions/poll.texi @@ -19,4 +19,12 @@ Mac OS X 10.4.0, AIX 5.3. Portability problems not fixed by Gnulib: @itemize +@item +Under BeOS, Gnulib's @code{poll} replacement can only be called on descriptors +created by the @code{socket} function, not on regular file descriptors. + +@item +Under Windows, when passing a pipe, Gnulib's @code{poll} replacement might +return 0 even before the timeout has passed. Programs using it with pipes can +thus busy wait. @end itemize diff --git a/doc/posix-functions/select.texi b/doc/posix-functions/select.texi index e59b3cf8e..c13b30f55 100644 --- a/doc/posix-functions/select.texi +++ b/doc/posix-functions/select.texi @@ -31,6 +31,10 @@ unmodified. On BeOS, @code{select} can only be called on descriptors created by the @code{socket} function, not on regular file descriptors. @item +Under Windows, when passing a pipe, Gnulib's @code{select} replacement might +return 0 even before the timeout has passed. Programs using it with pipes can +thus busy wait. +@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. -- 2.11.0