summaryrefslogtreecommitdiff
path: root/dev/gui/gui.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 08:36:06 -0300
committerGabriel Schneider <[email protected]>2026-11-20 08:36:06 -0300
commit446cde19a6b6fb7125fc749608cc12b7452dad6e (patch)
treea7c2792ecdb1833a2e5a3ef99b9fb6ce96c01a00 /dev/gui/gui.zig
parent2c2800c93e5417297dd06d3e52d5d336d975560c (diff)
parentae3b9e9d19492c827f257da8a224a19d77de51c1 (diff)
downloadpardes-446cde19a6b6fb7125fc749608cc12b7452dad6e.tar.gz
pardes-446cde19a6b6fb7125fc749608cc12b7452dad6e.zip
integration: a session's first client over an inherited socket before its first effects, the pair under PARDES_PAIR, and a session's last word, on the 9P run's fixes and the build's second pass: pardes-first-client (new --detach forks and returns; Options.pair and the join by fd; pardes FILE as a client and a session under the variable; ended CODE and left NAME: a client's own Detach exits 0 with its line again) and pardes-merge33, merged without a textual conflict; tui core-test 858/1013 (155 skipped), shell-test 1053/1056, the window builds; the coordinator's gate in the ledger (reorg/merge34)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/gui/gui.zig')
-rw-r--r--dev/gui/gui.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig
index ab33abe9..59e70935 100644
--- a/dev/gui/gui.zig
+++ b/dev/gui/gui.zig
@@ -1356,7 +1356,7 @@ const Client = struct {
defer cl.lock.unlock(cl.io);
for (cl.inbox.items) |msg| switch (msg) {
.unit, .screen, .refused, .blob => |b| std.heap.c_allocator.free(b),
- .checked => {},
+ .checked, .ended, .left => {},
};
cl.inbox.clearRetainingCapacity();
}
@@ -1444,6 +1444,12 @@ fn clientSession(init: std.process.Init, g: *Gui, opts_in: pardes.Options, test_
.done => {},
.gone => Said.no(io, "'{s}' let this client go (a Detach in it, or the session's end)", .{to.session}),
.failed => Said.no(io, "{s}", .{start.said()}),
+ .left => {
+ var said: [600]u8 = undefined;
+ std.Io.File.stderr().writeStreamingAll(io, std.fmt.bufPrint(&said, "pardes-gui: detached from '{s}', which is still running; come back with `pardes-gui attach {s}`\n", .{ to.session, to.session }) catch "pardes-gui: detached\n") catch {};
+ std.process.exit(0);
+ },
+ .ended => |code| std.process.exit(code),
}
}