poll: return immediately on POLLHUP.
authorErik Faye-Lund <kusmabite@gmail.com>
Thu, 26 Aug 2010 07:48:55 +0000 (09:48 +0200)
committerIan Beckwith <ianb@erislabs.net>
Sun, 29 Aug 2010 16:23:18 +0000 (17:23 +0100)
* lib/poll.c (poll): Always set timeout before wait_timeout is
computed.
(cherry picked from commit 0a051206787d83314ac69cf4c8857c0e880feaed)

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;
         }
     }