Forgot to make the eventfd cloexec and non-blocking

This commit is contained in:
Kovid Goyal 2019-07-05 10:08:15 +05:30
parent a41ef8d513
commit 556992a117
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -231,7 +231,7 @@ bool
initPollData(EventLoopData *eld, int display_fd) {
if (!addWatch(eld, "display", display_fd, POLLIN, 1, NULL, NULL)) return false;
#ifdef HAS_EVENT_FD
eld->wakeupFd = eventfd(0, 0);
eld->wakeupFd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
if (eld->wakeupFd == -1) return false;
const int wakeup_fd = eld->wakeupFd;
#else