szn

Bug 163 — server/socket.zig — Wrong errno retrieval in mapErr (same as #103)

163. server/socket.zig — Wrong errno retrieval in mapErr (same as #103)

File: src/server/socket.zig:28 Severity: MEDIUM Status: ✅ FIXED — replaced std.posix.errno(rc) with std.c.errno(rc).

Uses std.posix.errno(rc) instead of std.c.errno(rc). Same issue as bugs #103 and #82: C library socket()/bind()/listen()/accept() return -1 on error, but std.posix.errno(-1) derives errno 1 (EPERM) instead of the actual error. All socket operation failures fall through to error.Unexpected, making server startup failures impossible to diagnose correctly.


NEW BUGS (2026-06-25 — SGR overflow, partial writes, crash-on-escape found by opencode crash)