aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nsterm.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index ebe29e42619..f985786e198 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -4168,10 +4168,16 @@ ns_select (int nfds, fd_set *readfds, fd_set *writefds,
4168 /* Inform fd_handler that select should be called */ 4168 /* Inform fd_handler that select should be called */
4169 c = 'g'; 4169 c = 'g';
4170 emacs_write_sig (selfds[1], &c, 1); 4170 emacs_write_sig (selfds[1], &c, 1);
4171
4172 /* We rely on fd_handler timing out to cause
4173 nextEventMatchingMask below to return, so set it's timeout to
4174 an unreasonably long time. */
4175 timeout_date = [NSDate distantFuture];
4171 } 4176 }
4172 else if (nr == 0 && timeout) 4177 else if (nr == 0 && timeout)
4173 { 4178 {
4174 /* No file descriptor, just a timeout, no need to wake fd_handler */ 4179 /* No file descriptor, just a timeout, no need to wake
4180 fd_handler. Set nextEventMatchingMask timeout. */
4175 double time = timespectod (*timeout); 4181 double time = timespectod (*timeout);
4176 timeout_date = [NSDate dateWithTimeIntervalSinceNow: time]; 4182 timeout_date = [NSDate dateWithTimeIntervalSinceNow: time];
4177 } 4183 }