Skip to content

Instantly share code, notes, and snippets.

@hogliux
Last active May 25, 2025 18:22
Show Gist options
  • Save hogliux/ea4411ad37203e73f7ff2cbc8106c1c5 to your computer and use it in GitHub Desktop.
Save hogliux/ea4411ad37203e73f7ff2cbc8106c1c5 to your computer and use it in GitHub Desktop.
epoll regression on linux 6.15-rc6: epoll_pwait2 will block indefinitely
#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