diff options
Diffstat (limited to '9ns')
| -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 52a45ae..1079a1d 100644 --- a/9ns/src/nine.zig +++ b/9ns/src/nine.zig @@ -911,6 +911,9 @@ pub fn enameToErrno(ename: []const u8) linux.E { // A server that answers a flushed request with an error (Pardes says // "Interrupted system call") should look like a flush to the caller. .{ .needle = "interrupt", .err = .INTR }, + // acme's answer to a read whose window closed under it (Pardes says + // it too): the file is still named, it just has no more to give. + .{ .needle = "shut down", .err = .IO }, .{ .needle = "not exist", .err = .NOENT }, .{ .needle = "not found", .err = .NOENT }, .{ .needle = "no such", .err = .NOENT }, @@ -1035,6 +1038,7 @@ test { test "ename → errno mapping" { try testing.expectEqual(linux.E.INTR, enameToErrno("Interrupted system call")); try testing.expectEqual(linux.E.INTR, enameToErrno("read interrupted")); + 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.NOENT, enameToErrno("directory entry not found")); |
