diff options
author | Josh Triplett <josh@freedesktop.org> | 2006-04-16 11:23:52 -0700 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2006-04-16 11:23:52 -0700 |
commit | 53971ea183d9d1dcfbaec18b135e49c9c118fabb (patch) | |
tree | 2420142aab13e988c12e01945e8aba3966287701 /src | |
parent | 71de16fac2a145d5ef8069d2d28d7c32cea603cf (diff) | |
parent | 8275ac3a4a23220b5c3b4f191a45befe2d34d6bd (diff) |
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xcb
Diffstat (limited to 'src')
-rw-r--r-- | src/xcb_conn.c | 6 | ||||
-rw-r--r-- | src/xcb_in.c | 4 | ||||
-rw-r--r-- | src/xcb_util.c | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/xcb_conn.c b/src/xcb_conn.c index 1e93137..95b5fa2 100644 --- a/src/xcb_conn.c +++ b/src/xcb_conn.c @@ -253,7 +253,11 @@ int _xcb_conn_wait(XCBConnection *c, pthread_cond_t *cond, struct iovec **vector } pthread_mutex_unlock(&c->iolock); - ret = select(c->fd + 1, &rfds, &wfds, 0, 0) > 0; + do { + ret = select(c->fd + 1, &rfds, &wfds, 0, 0); + } while (ret == -1 && errno == EINTR); + if (ret < 0) + ret = 0; pthread_mutex_lock(&c->iolock); if(ret) diff --git a/src/xcb_in.c b/src/xcb_in.c index fa13e90..76f9702 100644 --- a/src/xcb_in.c +++ b/src/xcb_in.c @@ -229,7 +229,9 @@ static int read_block(const int fd, void *buf, const size_t len) fd_set fds; FD_ZERO(&fds); FD_SET(fd, &fds); - ret = select(fd + 1, &fds, 0, 0, 0); + do { + ret = select(fd + 1, &fds, 0, 0, 0); + } while (ret == -1 && errno == EINTR); } if(ret <= 0) return ret; diff --git a/src/xcb_util.c b/src/xcb_util.c index 93e180c..343e21f 100644 --- a/src/xcb_util.c +++ b/src/xcb_util.c @@ -27,7 +27,6 @@ #include <assert.h> #include <sys/types.h> -#include <sys/select.h> #include <sys/socket.h> #include <sys/un.h> #include <netinet/in.h> |