# HG changeset patch # User Paolo Bonzini # Date 1347519076 -7200 # Node ID 62741e75b7c5245d1eab358703633cdbc738e52b # Parent 090638c04620a52a84f551ef21aee7fe193f8746 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. diff --git a/ChangeLog b/ChangeLog --- 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 --- a/doc/posix-functions/poll.texi +++ b/doc/posix-functions/poll.texi @@ -19,4 +19,12 @@ 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 --- a/doc/posix-functions/select.texi +++ b/doc/posix-functions/select.texi @@ -31,6 +31,10 @@ 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.