diff options
author | marha <marha@users.sourceforge.net> | 2010-09-04 20:35:29 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-09-04 20:35:29 +0000 |
commit | 86f0d840164841d04abfea284e2d9be5ba742537 (patch) | |
tree | b9bab35a924b788e6e3c96a81307ae2736648187 /libxcb/src | |
parent | f2523be58f4546b530ab03ece3a9dd1183f4deec (diff) | |
parent | ff7fa74dd9fde036f79d02e5810dd5ded98dae59 (diff) | |
download | vcxsrv-86f0d840164841d04abfea284e2d9be5ba742537.tar.gz vcxsrv-86f0d840164841d04abfea284e2d9be5ba742537.tar.bz2 vcxsrv-86f0d840164841d04abfea284e2d9be5ba742537.zip |
svn merge ^/branches/released .
Diffstat (limited to 'libxcb/src')
-rw-r--r-- | libxcb/src/xcb_conn.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libxcb/src/xcb_conn.c b/libxcb/src/xcb_conn.c index 7ab6fd3d0..9a7b66c06 100644 --- a/libxcb/src/xcb_conn.c +++ b/libxcb/src/xcb_conn.c @@ -359,6 +359,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);
if (ret==SOCKET_ERROR)
|