Subject: Re: bug#48629: 28.0.50; GUI emacsclient frames stop accepting keyboard input around recv

From: Eli Zaretskii <[email-masked]>
Date: Wed, 26 May 2021 21:59:44 +0300

> From: "Basil L. Contovounesios" <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 26 May 2021 19:10:30 +0100
> 
> > IOW, when you find Emacs stuck in pselect, type "finish" and let Emacs
> > exit the pselect call.
> 
> I did this, and it returned zero after a while:

So it found no input available.

> > Is the keyboard descriptor in the set of descriptors pselect waits
> > for?
> 
> How do I determine what the keyboard descriptor is?

Look at fd_callback_info[desc].flags for values of DESC from zero to
max_desc, and see if any of them have the FOR_READ and KEYBOARD_FD
flags set.  Then see whether those descriptors, which have those flags
set, have their bit set in readfds set passed to pselect.