mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Fix another cause of superfluous inotify signals on Android
* src/android.c (android_select): If the event queue isn't empty upon the initial check, clear all fdsets.
This commit is contained in:
parent
dd2caf1a76
commit
bd5bfc2913
1 changed files with 13 additions and 0 deletions
|
|
@ -744,6 +744,19 @@ android_select (int nfds, fd_set *readfds, fd_set *writefds,
|
|||
|
||||
if (event_queue.num_events)
|
||||
{
|
||||
/* Zero READFDS, WRITEFDS and EXCEPTFDS, lest the caller
|
||||
mistakenly interpret this return value as indicating that an
|
||||
inotify file descriptor is readable, and try to poll an
|
||||
unready one. */
|
||||
|
||||
if (readfds)
|
||||
FD_ZERO (readfds);
|
||||
|
||||
if (writefds)
|
||||
FD_ZERO (writefds);
|
||||
|
||||
if (exceptfds)
|
||||
FD_ZERO (exceptfds);
|
||||
pthread_mutex_unlock (&event_queue.mutex);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue