diff options
| author | Gerd Möllmann | 2024-03-13 20:27:20 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2024-03-13 20:27:20 +0100 |
| commit | d95f2a882d5f0587a8e02c5be6f0fd005d4a6a43 (patch) | |
| tree | 72c74def636fc30aea5a156097ee054bd40bb193 /src | |
| parent | c5945e0f9eaf01e653d5afbce72837a05e3e347a (diff) | |
| download | emacs-d95f2a882d5f0587a8e02c5be6f0fd005d4a6a43.tar.gz emacs-d95f2a882d5f0587a8e02c5be6f0fd005d4a6a43.zip | |
ns_select fix for macOS terminals (bug#69561)
* src/nsterm.m (ns_select_1): Return early for terminals.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index f161edc4ac2..faf9324402b 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -4757,8 +4757,12 @@ ns_select_1 (int nfds, fd_set *readfds, fd_set *writefds, | |||
| 4757 | if (writefds && FD_ISSET(k, writefds)) ++nr; | 4757 | if (writefds && FD_ISSET(k, writefds)) ++nr; |
| 4758 | } | 4758 | } |
| 4759 | 4759 | ||
| 4760 | if (NSApp == nil | 4760 | /* emacs -nw doesn't have an NSApp, so we're done. */ |
| 4761 | || ![NSThread isMainThread] | 4761 | if (NSApp == nil) |
| 4762 | return thread_select (pselect, nfds, readfds, writefds, exceptfds, | ||
| 4763 | timeout, sigmask); | ||
| 4764 | |||
| 4765 | if (![NSThread isMainThread] | ||
| 4762 | || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0)) | 4766 | || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0)) |
| 4763 | thread_select (pselect, nfds, readfds, writefds, | 4767 | thread_select (pselect, nfds, readfds, writefds, |
| 4764 | exceptfds, timeout, sigmask); | 4768 | exceptfds, timeout, sigmask); |