Subject: bug#75275: 30.0.92; `make-thread` bug on macOS 15.2

From: Gerd Möllmann <[email-masked]>
Date: Thu, 02 Jan 2025 15:45:16 +0100

Gerd Möllmann <[email-masked]> writes:

> Stefan Kangas <[email-masked]> writes:
>
>> Thanks, I didn't have time to look into the above yet, but I noticed
>> that the bug wasn't there on emacs-29 and bisected the issue:
>>
>> 4ac4cec652ffaca4333d8f297b8a6c0e5bd79c68 is the first bad commit
>> commit 4ac4cec652ffaca4333d8f297b8a6c0e5bd79c68
>> Author: Gerd Möllmann <[email-masked]>
>> Date:   Sat Mar 9 15:06:29 2024 +0100
>>
>>     Prevent freezes on macOS (bug#69561)
>
> Thanks, there he is, the culprit :-).
>
> I don't know what to do now.

Maybe this one, after what Alan explained. Could you try it?

1 file changed, 2 insertions(+), 2 deletions(-)
src/nsterm.m | 4 ++--

modified   src/nsterm.m
@@ -4875,8 +4875,8 @@ Function modeled after x_draw_glyph_string_box ().
 
   if (![NSThread isMainThread]
       || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0))
-    thread_select (pselect, nfds, readfds, writefds,
-		   exceptfds, timeout, sigmask);
+    return thread_select (pselect, nfds, readfds, writefds,
+			  exceptfds, timeout, sigmask);
   else
     {
       struct timespec t = {0, 0};