aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Third2017-03-08 00:40:05 +0000
committerAlan Third2017-03-08 00:50:16 +0000
commita65236214d9202fb69a6ba5169d4ac1a4bcb0b0d (patch)
tree11318e8f0593c530de5911317a977ba92b6f28f9 /src
parentaa8dbd11a7c3ba093d044f9f0b40b29680bf8f8e (diff)
downloademacs-a65236214d9202fb69a6ba5169d4ac1a4bcb0b0d.tar.gz
emacs-a65236214d9202fb69a6ba5169d4ac1a4bcb0b0d.zip
Add missing timeout value in ns_select
* src/nsterm.m (ns_select): Set timeout to distant future when relying on fd_handler's timeout.
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 }