diff options
| author | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-09 15:49:48 -0800 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-09 16:19:33 -0800 |
| commit | 1a58c7f2115a982a9156779bb6141acd303ddef5 (patch) | |
| tree | fd3663db6a3edd0a5d0b49d2dbe67a99abbba7d5 /src | |
| parent | doc: Fix spelling of parameters (diff) | |
| download | wayland-1a58c7f2115a982a9156779bb6141acd303ddef5.tar wayland-1a58c7f2115a982a9156779bb6141acd303ddef5.tar.gz wayland-1a58c7f2115a982a9156779bb6141acd303ddef5.tar.bz2 wayland-1a58c7f2115a982a9156779bb6141acd303ddef5.tar.lz wayland-1a58c7f2115a982a9156779bb6141acd303ddef5.tar.xz wayland-1a58c7f2115a982a9156779bb6141acd303ddef5.tar.zst wayland-1a58c7f2115a982a9156779bb6141acd303ddef5.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wayland-client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c index 7503ca0..363d5dd 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -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; } |
