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.
This commit is contained in:
Jeffrey C. Ollie
2025-02-02 00:46:01 -06:00
parent cdd2099090
commit b7fa8e5947

View File

@ -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,