From b79ab6f98f226bfa80ba0a00e3fc8af9f70be018 Mon Sep 17 00:00:00 2001 From: "Franklin \"Snaipe\" Mathieu" Date: Mon, 5 Feb 2024 22:00:20 +0100 Subject: [PATCH] cgroup,cleaner: wait on level-triggered transitions The old code used edge-triggered transitions for epoll_wait on the cgroup.events file, which meant we were losing some events if we weren't fast enough to process them. This, in turn, caused the unlucky cleaner processes to hang on an epoll_wait, unable to clean up the unpopulated cgroup. With this commit, we now operate on level-triggered transitions, which allows cleaners to do their jobs properly. --- cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgroup.c b/cgroup.c index ba10209..1ee22db 100644 --- a/cgroup.c +++ b/cgroup.c @@ -164,7 +164,7 @@ static void run_cleaner_child(int lock, int parentfd, const char *name) } struct epoll_event event = { - .events = EPOLLET, + .events = 0, }; int epollfd = epoll_create1(0);