Mercurial > emacs
diff src/xgselect.c @ 110617:4e2238ed599f
* xgselect.c (xg_select): Clear file descriptors not set from rfds and wfds.
author | Jan D <jan.h.d@swipnet.se> |
---|---|
date | Sun, 26 Sep 2010 17:39:10 +0200 |
parents | 1d1d5d9bd884 |
children | 6a7fb61524be 376148b31b5e |
line wrap: on
line diff
--- a/src/xgselect.c Sun Sep 26 02:37:50 2010 +0200 +++ b/src/xgselect.c Sun Sep 26 17:39:10 2010 +0200 @@ -113,11 +113,17 @@ 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; }