Break out of poll on signal

master
Kenny Levinsen 2020-10-04 00:56:51 +02:00
parent daf27a5f11
commit 01779f7349
1 changed files with 1 additions and 7 deletions

8
main.c
View File

@ -363,13 +363,7 @@ static int display_poll(struct wl_display *display, short int events, int timeou
struct pollfd pfd[1]; struct pollfd pfd[1];
pfd[0].fd = wl_display_get_fd(display); pfd[0].fd = wl_display_get_fd(display);
pfd[0].events = events; pfd[0].events = events;
return poll(pfd, 1, timeout);
int ret;
do {
ret = poll(pfd, 1, timeout);
} while (ret == -1 && errno == EINTR);
return ret;
} }
static int display_dispatch_with_timeout(struct wl_display *display, int timeout) { static int display_dispatch_with_timeout(struct wl_display *display, int timeout) {