From: Jan Djärv Date: Sun, 14 Oct 2012 18:28:48 +0000 (+0200) Subject: * nsterm.m (ns_select): Count fd:s in writefs also. X-Git-Tag: emacs-24.2.90~233^2~20 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a36fb15e087568aa9aa304bf2bf53d09b6b1894c;p=emacs.git * nsterm.m (ns_select): Count fd:s in writefs also. Fixes: debbugs:12422 --- diff --git a/src/ChangeLog b/src/ChangeLog index 346fe0e86b3..0b3d02f75ac 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-10-14 Jan Djärv + + * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422). + 2012-10-13 Jan Djärv * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612). diff --git a/src/nsterm.m b/src/nsterm.m index 98dd0a8aab1..dfc84db50f7 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3444,7 +3444,10 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds, /* NSTRACE (ns_select); */ for (k = 0; readfds && k < nfds+1; k++) - if (FD_ISSET(k, readfds)) ++nr; + { + if (FD_ISSET(k, readfds)) ++nr; + if (FD_ISSET(k, writefds)) ++nr; + } if (NSApp == nil || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0))