diff options
| -rw-r--r-- | 9ns/src/nine.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/9ns/src/nine.zig b/9ns/src/nine.zig index c7abbe6..0dc957c 100644 --- a/9ns/src/nine.zig +++ b/9ns/src/nine.zig @@ -971,6 +971,9 @@ pub fn enameToErrno(ename: []const u8) linux.E { .{ .needle = "busy", .err = .BUSY }, .{ .needle = "in use", .err = .BUSY }, .{ .needle = "too long", .err = .NAMETOOLONG }, + // A server's open records all taken (pardes: 64): the fd table's + // word, which a shell prints as "Too many open files". + .{ .needle = "too many open files", .err = .MFILE }, .{ .needle = "not supported", .err = .OPNOTSUPP }, .{ .needle = "unsupported", .err = .OPNOTSUPP }, }; @@ -1075,6 +1078,7 @@ test "ename → errno mapping" { try testing.expectEqual(linux.E.IO, enameToErrno("window shut down")); try testing.expectEqual(linux.E.NOENT, enameToErrno("file does not exist")); try testing.expectEqual(linux.E.NOENT, enameToErrno("No Such File")); + try testing.expectEqual(linux.E.MFILE, enameToErrno("too many open files")); try testing.expectEqual(linux.E.NOENT, enameToErrno("directory entry not found")); try testing.expectEqual(linux.E.EXIST, enameToErrno("file already exists")); try testing.expectEqual(linux.E.NOTEMPTY, enameToErrno("directory not empty")); |
