Fixes the XTS XConnectionNumber test. This test creates a display connection, closes its file descriptor, tries to send a no-op, and then expects an error. XCB just goes into an infinite loop because poll() returns immediately with POLLNVAL set.
Signed-off-by: Aaron Plattner <[email protected]> --- src/xcb_conn.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/xcb_conn.c b/src/xcb_conn.c index 50a662b..6a07730 100644 --- a/src/xcb_conn.c +++ b/src/xcb_conn.c @@ -337,6 +337,16 @@ int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vec if(FD_ISSET(c->fd, &wfds)) #endif ret = ret && write_vec(c, vector, count); + +#if USE_POLL + if((fd.revents & (POLLERR | + POLLHUP | + POLLNVAL))) + { + _xcb_conn_shutdown(c); + ret = 0; + } +#endif } if(count) -- 1.7.0.4
pgpctoqgAvSyo.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg Your subscription address: [email protected]
