]> git.eshelyaron.com Git - emacs.git/commitdiff
* xgselect.c (xg_select): Clear file descriptors not set from rfds and wfds.
authorJan D <jan.h.d@swipnet.se>
Sun, 26 Sep 2010 15:39:10 +0000 (17:39 +0200)
committerJan D <jan.h.d@swipnet.se>
Sun, 26 Sep 2010 15:39:10 +0000 (17:39 +0200)
src/ChangeLog
src/xgselect.c

index 36e1fbab2bfef8965c882967e803c7dae67aa1f9..435c09f0ff81ac9724c6ec9229658c54e08ba534 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-26  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xgselect.c (xg_select): Clear file descriptors not set from
+       rfds and wfds.
+
 2010-09-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * syntax.c (back_comment): Detect the case where a 1-char comment
index d93c1bdf4050cba8181193cd9c0e40892dfa3d07..a06713458a00956e1855d7f7814a2a2eca69c29d 100644 (file)
@@ -113,11 +113,17 @@ xg_select (max_fds, rfds, wfds, efds, timeout)
               if (rfds && FD_ISSET (i, rfds)) ++retval;
               else ++our_fds;
             }
+          else if (rfds)
+            FD_CLR (i, rfds);
+
           if (have_wfds && FD_ISSET (i, &all_wfds))
             {
               if (wfds && FD_ISSET (i, wfds)) ++retval;
               else ++our_fds;
             }
+          else if (wfds)
+            FD_CLR (i, wfds);
+
           if (efds && FD_ISSET (i, efds))
             ++retval;
         }