mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-14 22:57:37 +03:00
Retry writing to wakeupfd on EAGAIN as well
This commit is contained in:
parent
7ab5244bf5
commit
c169f7ae83
4
glfw/backend_utils.c
vendored
4
glfw/backend_utils.c
vendored
@ -246,9 +246,9 @@ void
|
||||
wakeupEventLoop(EventLoopData *eld) {
|
||||
#ifdef HAS_EVENT_FD
|
||||
static const int64_t value = 1;
|
||||
while (write(eld->wakeupFd, &value, sizeof value) < 0 && errno == EINTR);
|
||||
while (write(eld->wakeupFd, &value, sizeof value) < 0 && (errno == EINTR || errno == EAGAIN));
|
||||
#else
|
||||
while (write(eld->wakeupFds[1], "w", 1) < 0 && errno == EINTR);
|
||||
while (write(eld->wakeupFds[1], "w", 1) < 0 && (errno == EINTR || errno == EAGAIN));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user