summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 21:07:11 -0300
committerGabriel Schneider <[email protected]>2026-11-21 22:26:19 -0300
commit27874074025f88dd9e27ece82c352c4a7c35ab51 (patch)
tree0e680a929b2c6dbc900c6ae6cce22b6121f0415b /runtime
parent603692c8effa9bf85a5fddc1afd1ac896227c0d3 (diff)
downloadpardes-27874074025f88dd9e27ece82c352c4a7c35ab51.tar.gz
pardes-27874074025f88dd9e27ece82c352c4a7c35ab51.zip
pair: a window pair's session lists as a window's (P49): the `pardes` a window execs with `--paired=FD` is only ever a window's pair's session, so it registers as `gui` (runtime/main.zig), with no word at the join and the wire unchanged; test/daemon.py: window-clients lists it `listed_as('has a frontend', 'gui')` (under the variable a pair is listed by its kind alone, P36) and ends by name the window session a terminal client's Detach kept (P36) once its window closes; gui_pair's two `(tty)` for the window pair's session are `(gui)`; gui() reads the session's pid from its /status (the window's child as a pair) and asks that process whether it carries on; with the variable window-clients and gui pass on Debug and ReleaseSafe
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime')
-rw-r--r--runtime/main.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/main.zig b/runtime/main.zig
index aa35e687..02a41c2f 100644
--- a/runtime/main.zig
+++ b/runtime/main.zig
@@ -1583,11 +1583,12 @@ fn nativeMain(std_init: std.process.Init) !void {
daemon.resumeLink(rec.link, rec.stub, kind, opts.ninep_name, rec.state orelse if (detached) .detached else .attached);
} else if (paired) |fd| {
// A window's pair's session: its first client on `fd`, the daemon
- // its own to dial (and to start, when none runs).
+ // its own to dial (and to start, when none runs), listed as the
+ // window's (P49: only a window's pair execs one with `--paired`).
opts.pair = fd;
term = .detached;
detached = true;
- if (daemon.wanted()) _ = daemon.register(null, kind, opts.ninep_name, .pair);
+ if (daemon.wanted()) _ = daemon.register(null, .gui, opts.ninep_name, .pair);
} else if (detach == null and std.c.getenv("PARDES_PAIR") != null) {
// The last step's way, behind its variable until it is the default:
// this terminal or window a client of a session forked off for it