https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240590
Bug ID: 240590 Summary: Linuxulator: EPOLLONESHOT is broken Product: Base System Version: 12.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: b...@freebsd.org Reporter: iwt...@gmail.com Here's a reproducer: #include <assert.h> #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <sys/epoll.h> int main() { int epfd = epoll_create(8); assert(epfd); struct epoll_event event = { .events = EPOLLOUT | EPOLLONESHOT, .data = 0 }; int err1 = epoll_ctl(epfd, EPOLL_CTL_ADD, STDIN_FILENO, &event); assert(err1 == 0); struct epoll_event events[1]; int n = epoll_wait(epfd, events, 1, -1); assert(n > 0); int err2 = epoll_ctl(epfd, EPOLL_CTL_MOD, STDIN_FILENO, &event); if (err2 == 0) { printf("ok\n"); } else { perror("EPOLL_CTL_MOD failed"); } return 0; } This program runs fine on Linux, while on FreeBSD it prints "EPOLL_CTL_MOD failed: No such file or directory". The man page on kevent says about EV_ONESHOT "After the user retrieves the event from the kqueue, it is deleted", so presumably that's why. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"