ns_select fix for macOS terminals (bug#69561)

* src/nsterm.m (ns_select_1): Return early for terminals.
This commit is contained in:
Gerd Möllmann 2024-03-13 20:27:20 +01:00
parent c5945e0f9e
commit d95f2a882d

View file

@ -4757,8 +4757,12 @@ Function modeled after x_draw_glyph_string_box ().
if (writefds && FD_ISSET(k, writefds)) ++nr;
}
if (NSApp == nil
|| ![NSThread isMainThread]
/* emacs -nw doesn't have an NSApp, so we're done. */
if (NSApp == nil)
return thread_select (pselect, nfds, readfds, writefds, exceptfds,
timeout, sigmask);
if (![NSThread isMainThread]
|| (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0))
thread_select (pselect, nfds, readfds, writefds,
exceptfds, timeout, sigmask);