mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
Retry writing to wakeupfd on EAGAIN as well
This commit is contained in:
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user