Check for poll errors
This commit is contained in:
parent
366db56553
commit
2bf76009e1
6
loop.c
6
loop.c
@ -81,7 +81,11 @@ void loop_poll(struct loop *loop) {
|
|||||||
ms = 0;
|
ms = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
poll(loop->fds, loop->fd_length, ms);
|
int ret = poll(loop->fds, loop->fd_length, ms);
|
||||||
|
if (ret < 0) {
|
||||||
|
swaylock_log_errno(LOG_ERROR, "poll failed");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
// Dispatch fds
|
// Dispatch fds
|
||||||
size_t fd_index = 0;
|
size_t fd_index = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user