Last active
May 25, 2025 18:22
-
-
Save hogliux/ea4411ad37203e73f7ff2cbc8106c1c5 to your computer and use it in GitHub Desktop.
epoll regression on linux 6.15-rc6: epoll_pwait2 will block indefinitely
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/epoll.h> | |
#include <unistd.h> | |
#include <iostream> | |
int main() | |
{ | |
auto epollfd = epoll_create1(0); | |
struct epoll_event events[16]; | |
while (true) | |
{ | |
std::cout << "enter" << std::endl; | |
const struct timespec timeout = {0, 1000}; // 1us | |
epoll_pwait2 (epollfd, events, 16, &timeout, nullptr); | |
std::cout << "exit" << std::endl; | |
} | |
close(epollfd); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment