Merge branch 'master' of git+ssh://git.freedesktop.org/git/xcb
This commit is contained in:
commit
53971ea183
|
@ -253,7 +253,11 @@ int _xcb_conn_wait(XCBConnection *c, pthread_cond_t *cond, struct iovec **vector
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_mutex_unlock(&c->iolock);
|
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);
|
pthread_mutex_lock(&c->iolock);
|
||||||
|
|
||||||
if(ret)
|
if(ret)
|
||||||
|
|
|
@ -229,7 +229,9 @@ static int read_block(const int fd, void *buf, const size_t len)
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
FD_SET(fd, &fds);
|
FD_SET(fd, &fds);
|
||||||
|
do {
|
||||||
ret = select(fd + 1, &fds, 0, 0, 0);
|
ret = select(fd + 1, &fds, 0, 0, 0);
|
||||||
|
} while (ret == -1 && errno == EINTR);
|
||||||
}
|
}
|
||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/select.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
|
Loading…
Reference in New Issue