(ns_select): Return at once if events are held (Bug#12834).
+2012-11-17 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
+ (ns_select): Return at once if events are held (Bug#12834).
+
2012-11-16 enami tsugutomo <tsugutomo.enami@jp.sony.com>
* unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
hold_event_q.q[hold_event_q.nr++] = *event;
/* Make sure ns_read_socket is called, i.e. we have input. */
kill (0, SIGIO);
+ send_appdefined = YES;
}
static Lisp_Object
/* NSTRACE (ns_select); */
+ if (hold_event_q.nr > 0)
+ {
+ /* We already have events pending. */
+ kill (0, SIGIO);
+ errno = EINTR;
+ return -1;
+ }
+
for (k = 0; k < nfds+1; k++)
{
if (readfds && FD_ISSET(k, readfds)) ++nr;