emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master bfcef4dd2b: * src/xterm.c (XTflash): Check return value of pselec


From: Po Lu
Subject: master bfcef4dd2b: * src/xterm.c (XTflash): Check return value of pselect.
Date: Thu, 28 Apr 2022 20:43:54 -0400 (EDT)

branch: master
commit bfcef4dd2b15154deaae1be465d3d879c4d15d3a
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    * src/xterm.c (XTflash): Check return value of pselect.
---
 src/xterm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index d774605832..c4e0305a6e 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;
     }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]