From bfcef4dd2b15154deaae1be465d3d879c4d15d3a Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 29 Apr 2022 08:43:27 +0800 Subject: [PATCH] * 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 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; } -- 2.39.2