From c07baa7bf83039600a54b261eaae7fdd4d673768 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 30 Oct 2026 21:06:51 -0300 Subject: builtins: Tty9p is a word of every hosted build, not a Linux build's alone, so a build's words, the rows of its Help, are the same on FreeBSD: a Linux client of a box session made SPC ?'s +Help with one row more than its session's and joined again (`pane 4.file.content`, and `.splice` over a +Help made again: two of the box soak's three divergences); whether its host is Linux is the authority's answer (tape.authority), so a replica of a FreeBSD session refuses Tty9p as its session does; test/cross_replay.py's session runs Help (a FreeBSD tape replayed here diverged at its pane's content) Co-Authored-By: Claude Opus 5.5 --- src/exec.zig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/exec.zig') diff --git a/src/exec.zig b/src/exec.zig index c5218279..af312c45 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -409,14 +409,20 @@ pub fn spawnTty(p: *Pardes, from: usize) ?*Pane { } pub fn spawnV9fsTty(p: *Pardes, from: usize) void { - if (comptime !hosted or @import("builtin").os.tag != .linux) + if (comptime !hosted) return p.reportError(from, "Tty9p", error.LinuxRequired); + // The session's host's and its 9P server's: a replica, of another + // build too (a Linux client of a FreeBSD session), has their answers. + if (!pardes.tape.authority(onLinux, .{})) return p.reportError(from, "Tty9p", error.LinuxRequired); - // The 9P server's: a replica has the authority's answer. if (!pardes.tape.authority(servesSocket, .{p})) return p.reportError(from, "Tty9p", error.SessionSocketRequired); _ = spawnTtyWithMount(p, from, true); } +fn onLinux() bool { + return @import("builtin").os.tag == .linux; +} + fn servesSocket(p: *Pardes) bool { return p.fs.socket_path.len != 0; } -- cgit v1.3