Files
zig/lib
Andrew Kelley e41342af83 std.Io.Threaded: reinstate fchmodat fallback
Stephen Gregoratto (original author of the fallback) says:

I read through both libcs again to compare:

Musl:
- `stat` path. Check error.
- If path is a symlink, return `OPNOTSUPP`.
- `openat` path as `O_PATH|O_NOFOLLOW|O_CLOEXEC`. Return `OPNOTSUPP` if we got `ELOOP`.
- Build procfs filename.
- `stat` procfs file.
- If procfs file is a symlink, return `OPNOTSUPP`.
- close path fd.

Glibc:
- open path as `O_PATH|O_NOFOLLOW|O_CLOEXEC`.
- fstatat path fd.
- If path is a symlink, return `OPNOTSUPP`.
- Build procfs filename.
- chmod procfs filename. Return `OPNOTSUPP` if we got `ENOENT`.
- close path fd.

I prefer glibc since you open the path first, which avoids a possible
TOCTOU race.
2025-12-23 22:15:11 -08:00
..
2025-11-22 22:42:38 +00:00
2025-12-21 03:54:17 +01:00
2025-11-12 16:00:16 +00:00
2025-11-22 22:42:38 +00:00