Subject: bug#48406: 28.0.50; Emacs stuck in infinite loop in wait_reading_process_output when opening in fullscreen (NS)

From: Illia Ostapyshyn <[email-masked]>
Date: Sat, 15 May 2021 10:34:44 +0200

> Now I've dug out my Mac I can confirm I see this hang as well.
> 
> The problem is that we never reach the NS run loop and therefore
> windowDidEnterFullScreen is never called.
> 
> It appears ns_select returns in this code:
> 
>   if (hold_event_q.nr > 0)
>     {
>       /* We already have events pending.  */
>       raise (SIGIO);
>       errno = EINTR;
>       return -1;
>     }
> 
> hmmmm.......
> 
> This fixes it for me, but whether it's a good idea or not I don't know:

I can confirm that the patch has worked for me as well.

As Andrii suggested, I'm attaching the output produced by nstrace (without the patch)