linux: ensure that group dir fd is closed (#5515)

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:
Mitchell Hashimoto
2025-02-03 13:46:28 -08:00
committed by GitHub

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,