mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
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:
parent
09877f3231
commit
1a58c7f211
1 changed files with 5 additions and 1 deletions
|
|
@ -1313,7 +1313,11 @@ wl_display_dispatch_queue(struct wl_display *display,
|
||||||
|
|
||||||
pfd[0].fd = display->fd;
|
pfd[0].fd = display->fd;
|
||||||
pfd[0].events = POLLIN;
|
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);
|
wl_display_cancel_read(display);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue