From: Po Lu Date: Fri, 29 Apr 2022 00:43:27 +0000 (+0800) Subject: * src/xterm.c (XTflash): Check return value of pselect. X-Git-Tag: emacs-29.0.90~1931^2~228 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bfcef4dd2b15154deaae1be465d3d879c4d15d3a;p=emacs.git * src/xterm.c (XTflash): Check return value of pselect. --- diff --git a/src/xterm.c b/src/xterm.c index d7746058326..c4e0305a6e9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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; }