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) {
|
wakeupEventLoop(EventLoopData *eld) {
|
||||||
#ifdef HAS_EVENT_FD
|
#ifdef HAS_EVENT_FD
|
||||||
static const int64_t value = 1;
|
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
|
#else
|
||||||
while (write(eld->wakeupFds[1], "w", 1) < 0 && errno == EINTR);
|
while (write(eld->wakeupFds[1], "w", 1) < 0 && (errno == EINTR || errno == EAGAIN));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user