poll: return immediately on POLLHUP.
authorErik Faye-Lund <kusmabite@gmail.com>
Thu, 26 Aug 2010 07:48:55 +0000 (09:48 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 26 Aug 2010 07:49:44 +0000 (09:49 +0200)
* lib/poll.c (poll): Always set timeout before wait_timeout is
computed.

ChangeLog
lib/poll.c

index ab5eccc..836f553 100644 (file)
--- 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.
index aeb7a35..7c52cb6 100644 (file)
@@ -505,7 +505,7 @@ poll (pfd, nfd, timeout)
           if (sought)
             handle_array[nhandles++] = h;
           if (pfd[i].revents)
-            wait_timeout = 0;
+            timeout = 0;
         }
     }