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.
pull/5515/head
Jeffrey C. Ollie 2025-02-02 00:46:01 -06:00
parent cdd2099090
commit b7fa8e5947
No known key found for this signature in database
GPG Key ID: 6F86035A6D97044E
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); assert(fd >= 0);
defer _ = linux.close(fd);
const args: extern struct { const args: extern struct {
flags: u64, flags: u64,