[PATCH xf86-video-qxl] Do not process watches on select() error.

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

 



This enables a kill of an Xorg process to propogate further.
Without this, the read masks would be set, and we could end up
blocking in an accept() call and not exiting from the signal.

Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx>
---
 src/spiceqxl_main_loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spiceqxl_main_loop.c b/src/spiceqxl_main_loop.c
index 92579eb..ac9e43f 100644
--- a/src/spiceqxl_main_loop.c
+++ b/src/spiceqxl_main_loop.c
@@ -296,7 +296,7 @@ static void select_and_check_watches(void)
     watch = (SpiceWatch*)watches.next;
     timeout.tv_sec = timeout.tv_usec = 0;
     retval = select(max_fd + 1, &rfds, &wfds, NULL, &timeout);
-    if (retval) {
+    if (retval > 0) {
         RING_FOREACH_SAFE(link, next, &watches) {
             watch = (SpiceWatch*)link;
             if (!watch->remove && (watch->event_mask & SPICE_WATCH_EVENT_READ)
-- 
2.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]