[Patch 2/2] libXt: Handle POLLNVAL as an exception

Jeremy Huddleston jeremyhu at freedesktop.org
Wed Feb 18 12:44:28 PST 2009


Add POLLNVAL to the list of exceptions, so it will be popped.

This is more of a workaround than an actual solution.  For some  
reason, we're getting POLLNVAL in some cases even through the fd is  
valid (don't ask me why, I just work here).  This patch adds POLLNVAL  
to the list of exceptions, so it will be popped, and we can look the  
other way and keep going pretending like nothing went wrong... which  
is better than sitting and spinning without ever popping.

Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
Written-by: Stephen Turnbull <stephenjturnbull at gmail.com>

--- src/NextEvent.c.orig	2006-07-12 03:05:55.000000000 +0900
+++ src/NextEvent.c	2009-02-14 17:22:36.000000000 +0900
@@ -259,7 +259,7 @@

  #define XPOLL_READ (POLLIN|POLLRDNORM|POLLPRI|POLLRDBAND)
  #define XPOLL_WRITE (POLLOUT|POLLWRNORM|POLLWRBAND)
-#define XPOLL_EXCEPT 0
+#define XPOLL_EXCEPT (POLLNVAL)

      if (!ignoreEvents)
  	wf->fdlistlen = wf->num_dpys = app->count;


More information about the xorg-devel mailing list