diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 04:16:41 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 04:16:41 -0300 |
| commit | 5b7124d10f9b2db8d1c5e99eacb9b6d2fffff0cc (patch) | |
| tree | dc50936490ad8636f5431da30ec3aaa38339c936 /core/exec.zig | |
| parent | 6e8735895d04c0073eb28cc1a2f431a2ba587e9d (diff) | |
| parent | 8fb080c6208bccf9ef12eca630b0534312ae5fe7 (diff) | |
| download | pardes-5b7124d10f9b2db8d1c5e99eacb9b6d2fffff0cc.tar.gz pardes-5b7124d10f9b2db8d1c5e99eacb9b6d2fffff0cc.zip | |
integration: the core's calls out to the host go through the tape's handle, on the devices once and the attach that is always a client: pardes-handle-6 (6a, 6b, 6c, 8a: p.tape.host(p, .name, .{ args }) derived from the Host table; Wrap, hostOf and wrap deleted; no line of core/ outside the tape names the host's table, held by root.zig's scan; the tape's bytes unmoved) and pardes-merge30, merged without a textual conflict; tui core-test 857/1008 (151 skipped), shell-test 1048/1051, the window builds; the coordinator's gate in the ledger (reorg/merge31)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/exec.zig')
| -rw-r--r-- | core/exec.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/exec.zig b/core/exec.zig index 1ec47eb3..74037db0 100644 --- a/core/exec.zig +++ b/core/exec.zig @@ -418,7 +418,7 @@ fn refusedPlacement(p: *Pardes, id: usize) bool { /// Whether a shell would be started in `dir` and `dir` is not there: asked /// only of a host that starts shells, and only of a local path. pub fn missingDir(p: *Pardes, dir: []const u8) bool { - if (p.host.vtable.spawn == null) return false; + if (!p.tape.has(p, .spawn)) return false; // A peer's directory (`/n/peer/x`) is no directory on this host, where // the shell would start: no command or terminal runs there, and none // is made to say `exit 127`. @@ -535,7 +535,7 @@ const repl_quiet_ns: u64 = 100 * std.time.ns_per_ms; /// The host's clock now; core time (`now_ns`, `stepped_ns`) is as old as /// the last frame, seconds in an idle session. pub fn clockNow(p: *Pardes) u64 { - return if (p.host.vtable.now) |clock| clock(p.host.ctx) else p.clock.now_ns; + return p.tape.host(p, .now, .{}) orelse p.clock.now_ns; } /// Sends the Enters a paste into pane `id`'s REPL is owed: when the REPL @@ -1018,7 +1018,7 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Settings.Setting, arg: ?[ const spec = config.Settings.FontSpec.parse(arg orelse return) orelse return; // The session's machine's fonts, a question to its disk: a // client's replay takes the session's answer, never its own. - const found = pardes.tape.site(.fonts, p.scratch.allocator(), fontNamed, .{ p.scratch.allocator(), spec.name }); + const found = p.tape.site(.fonts, p.scratch.allocator(), fontNamed, .{ p.scratch.allocator(), spec.name }); const nul = std.mem.indexOfScalar(u8, found, 0) orelse return; if (!p.settings.requestFont(found[0..nul], found[nul + 1 ..], spec.size_hundredths)) return; p.font_request_taken = false; @@ -1035,7 +1035,7 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Settings.Setting, arg: ?[ return p.setMessage(.at(v.active), said.print("Shell: the default again, {s} ($SHELL, else /bin/sh)", .{p.sessionShell()[0..@min(p.sessionShell().len, 256)]})); } var why: [320]u8 = undefined; - if (pardes.tape.site(.shell, null, @import("dev").host_io.Shell.refusal, .{ want[0..@min(want.len, 200)], &why })) |refused| { + if (p.tape.site(.shell, null, @import("dev").host_io.Shell.refusal, .{ want[0..@min(want.len, 200)], &why })) |refused| { var text: pardes.Kind.Buf(340) = .{}; return p.reportFailure(v.active, text.print("Shell: {s}", .{refused})); } |
