select: Correct timeout.
authorRené Berber <r.berber@computer.org>
Tue, 15 Jun 2010 08:29:07 +0000 (10:29 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 15 Jun 2010 08:29:07 +0000 (10:29 +0200)
ChangeLog
lib/select.c

index 4ad700df5d0a435ba6d9f5b474a5d468934a7871..747e29d3d2f5744c97398e44cd4047cacd7f754f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-06-15  René Berber  <r.berber@computer.org>  (tiny change)
+
+       select: Correct timeout.
+       * lib/select.c (rpl_select): Compute wait_timeout correctly.
+
 2010-06-14  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
 
        git-version-gen: init shell var to avoid env var influence
index 773689cf9296011f8d042192f57e15d3b957280d..5677fdd478f0e1fdb7f2dbf94351d6ccec1c2985 100644 (file)
@@ -246,7 +246,7 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
     wait_timeout = INFINITE;
   else
     {
-      wait_timeout = timeout->tv_sec + timeout->tv_usec / 1000;
+      wait_timeout = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
 
       /* select is also used as a portable usleep.  */
       if (!rfds && !wfds && !xfds)