From a75956bb3443aa8aac778d2ff12c42f5ef99e0e9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 18 Nov 2026 20:52:50 -0300 Subject: runtime: main, daemon, upgrade, crash, addon_test, 9p_io, 9p and macos.zig into runtime/ (the reorganisation's tree, step 2a), skill.txt with main.zig, its one reader: module `runtime` (runtime/root.zig) and the core, each naming the other, a product's root (main.zig, macos.zig) a module of its own over both; the files name across by module (`@import("runtime").daemon`, `@import("core").look`), pardes.zig exporting what they name (ctl, edit_cmd, tracy, selection_pipe, and the frontends until they move); core-test and shell-test run each module's test program, so the same tests run (the ledger: every named test of every suite the base's, tui and gui); nothing else changes: frames byte-identical, the same counts (tui core-test 822/963, the one more an anonymous collector) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- src/host_io.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/host_io.zig') diff --git a/src/host_io.zig b/src/host_io.zig index d199c839..cadcc1d2 100644 --- a/src/host_io.zig +++ b/src/host_io.zig @@ -5,11 +5,11 @@ const posix = std.posix; const libc = std.c; const pardes = @import("pardes.zig"); const selection_pipe = @import("selection_pipe.zig"); -const ninep_io = @import("9p_io.zig"); +const ninep_io = @import("runtime").ninep_io; const filesystem = @import("fs.zig"); const file_watch = @import("file_watch.zig"); const replica = @import("replica.zig"); -const daemon = @import("daemon.zig"); +const daemon = @import("runtime").daemon; const panes = @import("panes.zig"); pub const Host = struct { @@ -1195,7 +1195,7 @@ pub const Shell = struct { const pid = rcPid(name) orelse continue; // This pid's are this process's, but in an upgraded one: those // were its old image's (upgrade.zig), and its own come after. - if (pid == std.c.getpid() and @import("upgrade.zig").resumed == null) continue; + if (pid == std.c.getpid() and @import("runtime").upgrade.resumed == null) continue; if (pid != std.c.getpid() and std.posix.errno(std.c.kill(pid, @fromBackingInt(@intCast(0)))) != .SRCH) continue; if (name.len >= 64 or n == dead.len) continue; @memcpy(dead[n][0..name.len], name); @@ -2188,7 +2188,7 @@ pub fn forkShell( ninep_io.setCloexec(master); // The daemon keeps a dup: this session killed outright never hangs the // shell up (daemon.zig). - @import("daemon.zig").pty(pid, master); + @import("runtime").daemon.pty(pid, master); if (core) |c| c.acknowledgeShell(pane, std.mem.span(spawn.path), one_line == null and spawn.argv[1] != null); return .{ .file = .{ .handle = master, .flags = .{ .nonblocking = false } }, .pid = pid }; } -- cgit v1.3