Retry writing to wakeupfd on EAGAIN as well
This commit is contained in:
parent
7ab5244bf5
commit
c169f7ae83
1 changed files with 2 additions and 2 deletions
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 a new issue