aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-09-04 19:55:34 +0000
committermarha <marha@users.sourceforge.net>2010-09-04 19:55:34 +0000
commitff7fa74dd9fde036f79d02e5810dd5ded98dae59 (patch)
treed102eff380f9f7b273c03ef7e8f49f2ab6eed120
parenta0fa440dee24b4b39d30c1b04579691d42efba65 (diff)
downloadvcxsrv-ff7fa74dd9fde036f79d02e5810dd5ded98dae59.tar.gz
vcxsrv-ff7fa74dd9fde036f79d02e5810dd5ded98dae59.tar.bz2
vcxsrv-ff7fa74dd9fde036f79d02e5810dd5ded98dae59.zip
libxcb git update 4/9/2010
-rw-r--r--libxcb/src/xcb_conn.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c
index f0b9dd08c..d8cbcb366 100644
--- a/libxcb/src/xcb_conn.c
+++ b/libxcb/src/xcb_conn.c
@@ -364,6 +364,13 @@ int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vec
do {
#if USE_POLL
ret = poll(&fd, 1, -1);
+ /* If poll() returns an event we didn't expect, such as POLLNVAL, treat
+ * it as if it failed. */
+ if(ret >= 0 && (fd.revents & ~fd.events))
+ {
+ ret = -1;
+ break;
+ }
#else
ret = select(c->fd + 1, &rfds, &wfds, 0, 0);
#endif