From b7fa8e5947f0b6a0fda9f8c222b2ca13a3f313d2 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sun, 2 Feb 2025 00:46:01 -0600 Subject: [PATCH] linux: ensure that group dir fd is closed The CLOEXEC flag on the fd will ensure that the directory is closed on the child, but also need to close the fd in the parent. --- src/os/cgroup.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/os/cgroup.zig b/src/os/cgroup.zig index d94a4a728..5645e337a 100644 --- a/src/os/cgroup.zig +++ b/src/os/cgroup.zig @@ -102,6 +102,7 @@ pub fn cloneInto(cgroup: []const u8) !posix.pid_t { } }; assert(fd >= 0); + defer _ = linux.close(fd); const args: extern struct { flags: u64,