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.
pull/5570/head
Mitchell Hashimoto 2025-02-03 13:46:28 -08:00 committed by GitHub
commit 7b593b9d7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

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,