Skip to content

Commit

Permalink
cgroup,cleaner: ignore EINTR on epoll_wait
Browse files Browse the repository at this point in the history
This avoids killing an active cleaner when attaching to it via
PTRACE_SEIZE, which is helpful when debugging.
  • Loading branch information
Snaipe committed Feb 6, 2024
1 parent 7469152 commit a9ab558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static void run_cleaner_child(int lock, int parentfd, const char *name)
char populated[BUFSIZ];
for (;;) {
int ready = epoll_wait(epollfd, &event, 1, -1);
if (ready == -1) {
if (ready == -1 && errno != EINTR) {
warn("run_cgroup_child: epoll_wait cgroup.events");
goto recursiveClean;
}
Expand Down

0 comments on commit a9ab558

Please sign in to comment.