| author | |
| committer | |
| log | 4cdbde55b4b1adcd27be3b0a3d7c888e90df2399 |
| tree | 3221f7c4d4bd6f63f520670dcc1b9ff03cee2a19 |
| parent | e872c72c553992f07348a7000db821c553d267e5 |
| signature | Commit is signed but in an unrecognized format. |
- per darwin-xnu source, fcntl F_GETPATH will return ENOSPC when path
exceeds either user-supplied buffer or system MAXPATHLEN
- macOS does not document this (and other) possible errno values1 files changed, 1 insertions(+), 0 deletions(-)
lib/std/os.zig+1| ... | ... | @@ -5098,6 +5098,7 @@ pub fn getFdPath(fd: fd_t, out_buffer: *[MAX_PATH_BYTES]u8) RealPathError![]u8 { |
| 5098 | 5098 | switch (errno(system.fcntl(fd, F.GETPATH, out_buffer))) { |
| 5099 | 5099 | .SUCCESS => {}, |
| 5100 | 5100 | .BADF => return error.FileNotFound, |
| 5101 | .NOSPC => return error.NameTooLong, | |
| 5101 | 5102 | // TODO man pages for fcntl on macOS don't really tell you what |
| 5102 | 5103 | // errno values to expect when command is F.GETPATH... |
| 5103 | 5104 | else => |err| return unexpectedErrno(err), |