Commit 1a58c7f2 authored by Kristian Høgsberg's avatar Kristian Høgsberg

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.
parent 09877f32
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment