summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 22:06:33 -0300
committerGabriel Schneider <[email protected]>2026-11-17 22:23:50 -0300
commit920110be4c597b4b93fc2d38179c09b335186253 (patch)
treefb5a3eaebb48b8c52ec0e23540e5065d940995d0 /src/main.zig
parent7d10ad68b07a7bbab23fa8565d39183e4387c478 (diff)
downloadpardes-920110be4c597b4b93fc2d38179c09b335186253.tar.gz
pardes-920110be4c597b4b93fc2d38179c09b335186253.zip
words: a session with no frontend of its own is `detached` in the code, one word for what was `headless`, `parked`, `alone_unattended`, `Term.none` and `!attached()` (PARDES.md ruling 1): main.zig's and gui.zig's `headless` (run, runNative, localSession) are `detached`, tui.zig's `Term.none` is `Term.detached`, the window's `Shell.parked` (its Gui kept while detached) is `Shell.detached`, `replica.Peers.alone_unattended` is `Peers.detached`, and the terminal's `Shell.attached()` is `Shell.detached()`, its five callers and `watched` negated to match (a test's Shell with no screen is not detached, as it was attached); the tape's `headless`, a replica core that skips `render` and the host calls inside it (set on every client), is `skips_render`, its replay run named `skips-render` ("replay X: skips-render replica: N digests agree"), and the two that read that line follow (test/tty.zig's other-build replay, test/cross_replay.py); NOT renamed, a different fact: `Core.unattended` (detached AND no client: nobody looks), a watched field on the tape by index; names only, no logic moved; tui core-test 811/950 (139 skipped), shell-test 993/996, behaviour-test 269/273 (the four addon ABI tests the base fails) and the same with --replay, process-test 2 of 144 failed (lspcomplete and lspcompletemoved, the base's), replicas pass (checked/wrong 0), daemon.py main passes; gui frame corpus 77/77 byte-identical against mbase, unit-test 1582/1590 (the base's 8 failures)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig
index 4a55695c..36d2da75 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1519,19 +1519,19 @@ fn nativeMain(std_init: std.process.Init) !void {
opts.rows = 50;
}
const kind: daemon.Kind = if (pardes.platform == .gui) .gui else .tty;
- var term: @import("tui/tui.zig").Term = if (detach != null) .none else .open;
- var headless = detach != null;
+ var term: @import("tui/tui.zig").Term = if (detach != null) .detached else .open;
+ var detached = detach != null;
upgrade.remember(args);
if (upgrade.resumed) |*rec| {
// Close-on-exec again: a shell forked from here inherits none.
rec.closeOnExec(true);
opts.load_path = rec.dump;
- term = .none;
+ term = .detached;
for (rec.ttys[0..rec.nttys]) |t| if (t.primary) {
term = .{ .fd = .{ .fd = t.fd, .termios = t.termios } };
};
- headless = if (pardes.platform == .gui) !rec.window else rec.nttys == 0;
- daemon.resumeLink(rec.link, rec.stub, kind, opts.ninep_name, headless);
+ detached = if (pardes.platform == .gui) !rec.window else rec.nttys == 0;
+ daemon.resumeLink(rec.link, rec.stub, kind, opts.ninep_name, detached);
} else if (daemon.wanted()) {
if (detach != null or pardes.platform == .gui) {
_ = daemon.register(null, kind, opts.ninep_name, detach != null);
@@ -1574,7 +1574,7 @@ fn nativeMain(std_init: std.process.Init) !void {
},
else => return err,
},
- .gui => try @import("gui/gui.zig").run(init, opts, headless),
+ .gui => try @import("gui/gui.zig").run(init, opts, detached),
.macos => unreachable,
}
daemon.tellStubExit(0);