1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-05 07:01:11 -08:00

* src/xterm.c (XTflash): Check return value of pselect.

This commit is contained in:
Po Lu 2022-04-29 08:43:27 +08:00
parent faa29fa2c9
commit bfcef4dd2b

View file

@ -8848,7 +8848,7 @@ XTflash (struct frame *f)
GC gc;
XGCValues values;
fd_set fds;
int fd;
int fd, rc;
block_input ();
@ -8921,10 +8921,10 @@ XTflash (struct frame *f)
FD_SET (fd, &fds);
/* Try to wait that long--but we might wake up sooner. */
pselect (fd + 1, &fds, NULL, NULL, &timeout, NULL);
rc = pselect (fd + 1, &fds, NULL, NULL, &timeout, NULL);
/* Some input is available, exit the visible bell. */
if (FD_ISSET (fd, &fds))
if (rc >= 0 && FD_ISSET (fd, &fds))
break;
}