client: Handle EINTR in wl_display_dispatch_queue()

Restart the poll() if we take a signal.  This is easily triggered in
an application that ends up blocking in eglSwapBuffers(), and causes EGL
to fail to allocate a back buffer.
This commit is contained in:
Kristian Høgsberg 2013-12-09 15:49:48 -08:00
parent 09877f3231
commit 1a58c7f211

View file

@ -1313,7 +1313,11 @@ wl_display_dispatch_queue(struct wl_display *display,
pfd[0].fd = display->fd;
pfd[0].events = POLLIN;
if (poll(pfd, 1, -1) == -1) {
do {
ret = poll(pfd, 1, -1);
} while (ret == -1 && errno == EINTR);
if (ret == -1) {
wl_display_cancel_read(display);
return -1;
}