Skip to content

Commit

Permalink
Actually set the epoll_events... for our fake fd
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Mar 19, 2024
1 parent ac87898 commit 2b6b3bf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/linux/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ evfilt_write_knote_create(struct filter *filt, struct knote *kn)
if (kn->kn_flags & KNFL_FILE) {
int evfd;

/* Convert the kevent into an epoll_event */
#if defined(HAVE_EPOLLRDHUP)
kn->epoll_events = EPOLLIN | EPOLLRDHUP;
#else
kn->epoll_events = EPOLLIN;
#endif
if (kn->kev.flags & EV_CLEAR)
kn->epoll_events |= EPOLLET;

/*
* We only set oneshot for cases where we're not going to
* be using EPOLL_CTL_MOD.
Expand Down

0 comments on commit 2b6b3bf

Please sign in to comment.