From 6b89fed454fd56a3af4b576646538b45d3315146 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 29 Oct 2026 12:32:23 -0300 Subject: FreeBSD: the tty pardes builds for it and runs there, terminals, 9P and the daemon included Cross-compiled with -Dtarget=x86_64-freebsd.15.0 (15 ships libutil.so.10; Zig's default 14.0 links .so.9) and run on the FreeBSD 15.1 box: - 9p_io serves there: fstatat, not Linux's statx. madvise is Linux's. - WINCH reaches the sigwait thread through a handler that does nothing: FreeBSD drops a signal ignored by default as it is sent. - A dead terminal answers a write with ENXIO, which std does not expect: a Debug build traced it to stderr, that same terminal, and recursed until the stack ran out (a session whose ssh dropped hung). No tracing there. - waitid's FreeBSD numbers and 64-bit id: a command pane's exit is seen. - No /proc: a shell's directory and program by sysctl, ttyTaken by the foreground group, the foreground job's name by its program. - File watching by FreeBSD 15's inotify. - ghostty's kitty loader: off Linux a stat comes before a t=f open (a FIFO hung it); FreeBSD's shm_open refuses O_NONBLOCK. - vaxis's test terminal has no read off Linux: no input thread for it. - test-install: the test-build programs installed into /test, to run where the build cannot. Co-Authored-By: Claude Opus 5.5 --- src/memory.zig | 1 + 1 file changed, 1 insertion(+) (limited to 'src/memory.zig') diff --git a/src/memory.zig b/src/memory.zig index cb75ee0e..47bd755d 100644 --- a/src/memory.zig +++ b/src/memory.zig @@ -442,6 +442,7 @@ pub fn trim() void { /// 71 MiB that way. Only the region given, never the whole process (a prctl /// would reach every shell and server pardes starts). pub fn sparse(region: []u8) void { + if (comptime builtin.os.tag != .linux) return; advise(region, std.posix.MADV.NOHUGEPAGE); } -- cgit v1.3