From bbae7225e939daf4b6360d3de7af06c0fd95ce8d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 21 Nov 2026 06:21:57 -0300 Subject: pair: the process suite as pairs from 13 of 145 failing to 7 that stay (the goldens of one cause, open): the harness dials a pair's session, the launched client's child (test/process.zig `of`, `childOf`: it dialled the launched pid's socket); a Restore in a pair no daemon keeps is refused in words, as its Upgrade is (P42: runtime/session.zig `restore`: it let the client go and the session ended with its last link), and the three cases that Restore a pair run it with a daemon of their own root's (tty.zig `privateDaemon`, e2e_harness `PARDES_HARNESS_DAEMON`, process.zig `Detached.tty_daemon`, ended by `--kill-all` at its deinit); a pair's launch with no terminal says what the own path says and forks no session (main.zig `pair`, `noTerminal`: it said "pardes: NoDevice" after forking one); a terminal client ended by TERM or HUP dies of the signal once its goodbye is said and its terminal put back, as the own path's stub does (tui.zig `dieOfQuitSignal`: it exited 0 since pair-3), and the kill test takes a pair's hang-up as the close P36 ruled; PARDES_PAIR=1 process-test 8 of 145 (7 goldens of one family: resizes=2, a terminal panned in a view shorter than the one that sized it, a restored terminal's history; winch once), without the variable 0 of 145 Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- runtime/session.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime/session.zig') diff --git a/runtime/session.zig b/runtime/session.zig index 60644aa6..5e99384e 100644 --- a/runtime/session.zig +++ b/runtime/session.zig @@ -188,6 +188,10 @@ pub fn Loop(comptime Frontend: type) type { /// let go (host_io.restoreCore); its shells and the frontend's /// devices with it. fn restore(l: *L, path: []const u8) void { + // A pair's session no daemon keeps: a Restore lets every client + // go, and its one could not join it again (no socket finds it): + // refused, as its Upgrade is (tui.zig `upgradeNow`). + if (l.peers.count() > 0 and daemon.link < 0) return l.core.reportFailure(l.core.view().active, "Restore: no daemon keeps this session, so its client could not join it again; this session stays as it is"); const nc = host_io.restoreCore(l.gpa, l.core, path, &l.peers, l.watches.fd, &l.watches.table) orelse return; l.fe.restoring(nc); // The old core's pipes end, and an answer to its query is -- cgit v1.3