summaryrefslogtreecommitdiff
path: root/dev/gui/gui.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 02:21:52 -0300
committerGabriel Schneider <[email protected]>2026-11-20 04:00:32 -0300
commit1967cf64dc6d7490d386db874cf1866b764f235c (patch)
treefd11484ffcb69b6e70fe6ea9610e8fdfb8d682bf /dev/gui/gui.zig
parent969369d4b84fa1847dc3dee0e737dcd58e56c5e7 (diff)
downloadpardes-1967cf64dc6d7490d386db874cf1866b764f235c.tar.gz
pardes-1967cf64dc6d7490d386db874cf1866b764f235c.zip
daemon: a session registers again with a daemon that was restarted: its link's reader, woken by the link's end alone (no timer, no poll: an idle session stays at 0 wakeups), dials the next daemon, starting one if none answers, and says its hello again on the link's own fd (dup3, so the session's own sends never race a new fd); the session loop, woken once by the note, tells it its shells' masters (`Ptys.tellDaemon`) and its clients again (`relinked`); a link the daemon never took (another build's) or the session's own end (`quit`) is not dialled again; test/daemon.py's `relink` (in plain, and alone as `--relink`), first failing on the base ("a daemon again" timed out: nothing dialled), now: the daemon killed, its two sessions (one detached, one with its terminal) start the next and are listed again with their shells, a client attaches, the detached one killed outright leaves its shell to another's Adopt, 0 and 0 wakeups in 2 s before and after; and the killed-session words in daemon.py read once the test's terminal has them (a race of the test's own); gated with the previous change, Debug: tui core-test 855/1005, shell-test 1046/1049, term 17/17, pane 183/184, kitty 45/45, behaviour 275/275 and its replay, process-test 0 of 144 failed, both soaks diverged 0 unequal 0 at 30/80/207 ms (corpus 22 scenes the same), daemon.py plain (50 cycles), far, games, window-clients, gui, upgrade both ways with clients attached pass; gui unit-test 1643/1647 (BaselineHarnessMismatch only); macOS x86_64 and aarch64, FreeBSD cross-builds pass; the frame and perf gate against tree2 PASS: 77/77 frames, perfab-corpus2x -0.114% (threshold 0.4%), 121 per-operation counts within 0.1% (largest +0.014%)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/gui/gui.zig')
-rw-r--r--dev/gui/gui.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig
index 81d58137..2aaa8bcc 100644
--- a/dev/gui/gui.zig
+++ b/dev/gui/gui.zig
@@ -3182,6 +3182,7 @@ fn deliverNote(ctx: *anyopaque, note: daemon.Note) void {
const s: *Shell = @ptrCast(@alignCast(ctx));
const q = s.queue;
switch (note) {
+ .relinked => q.wake(),
.adopted => |a| {
for (a.pids[0..a.n], a.fds[0..a.n]) |pid, fd| q.push(.{ .adopted = .{ .pid = pid, .fd = fd } });
q.push(.{ .adopted = .{ .pid = 0, .fd = -1 } });