changeset 13574:ac05886b34b6

poll: return immediately on POLLHUP. * lib/poll.c (poll): Always set timeout before wait_timeout is computed.
author Erik Faye-Lund <kusmabite@gmail.com>
date Thu, 26 Aug 2010 09:48:55 +0200
parents e036e928c3d8
children 34fed8ca014c
files ChangeLog lib/poll.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-26  Erik Faye-Lund  <kusmabite@gmail.com>
+
+	poll: return immediately on POLLHUP.
+	* lib/poll.c (poll): Always set timeout before wait_timeout is
+	computed.
+
 2010-08-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	Fix test-unlinkat, test-rmdir failure on AIX 5.3.
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -505,7 +505,7 @@
           if (sought)
             handle_array[nhandles++] = h;
           if (pfd[i].revents)
-            wait_timeout = 0;
+            timeout = 0;
         }
     }