summaryrefslogtreecommitdiff
path: root/dev/tui
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 03:29:45 -0300
committerGabriel Schneider <[email protected]>2026-11-21 04:32:01 -0300
commitfe0aa07c18a9fd5ca6bdcb78e9354a2745e32298 (patch)
treedc1c01af7fa00f1ea809d618a5f18365e705f326 /dev/tui
parentf395894dd27c2d7a78c14f21b3c857d90db13800 (diff)
downloadpardes-fe0aa07c18a9fd5ca6bdcb78e9354a2745e32298.tar.gz
pardes-fe0aa07c18a9fd5ca6bdcb78e9354a2745e32298.zip
client: what the pair's last rounds left, each a test first: a window client exec'd at its session's Upgrade comes back the size it was, not the default (runtime/client.zig `execAgain` passed `--attach=` alone, so the new process made a 1120x720 window: a `--geometry=900x560` pair's session went from 56x16 to 70x20 after an Upgrade to another build, with the variable or without (any `pardes-gui attach`); now the window's size at the exec, SDL_GetWindowSize, as `--geometry=WxH`); a pair's client exec'd at an Upgrade waits for its session at `ended` as before the exec (tui.zig and gui.zig `runClient` asked `opts.pair`, which the exec'd `--attach=` client has not: now every near client waits, a non-child answers ECHILD at once; not seen to fail here: the subreaper took the session first); tests in test/daemon.py: `pair_upgrade_views` (plain, --pair: two clients' own views, the pair's scroll and the attach's focus, the same after a same-build Upgrade: the screens by pyte, the focus by where typing lands: passed before this change too), `pair_exec_reaps`, `far_exec` (a far client, PARDES_REPLICA_FAR by the socket's path, execs the build at its start path and agrees after: passed before too), `pair_window_geometry` (offscreen, not test mode: failed before), the last three in --upgrade OLD NEW
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/tui')
-rw-r--r--dev/tui/tui.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig
index a6d2216d..09704424 100644
--- a/dev/tui/tui.zig
+++ b/dev/tui/tui.zig
@@ -800,9 +800,11 @@ pub fn runClient(init: std.process.Init, opts: pardes.Options, path: []const u8,
},
.ended => |code| {
screen.leave();
- // A pair's client is its session's parent: its status once it
- // is gone, as a terminal's job ends with its program.
- if (opts.pair != null) {
+ // A pair's client is its session's parent, an exec'd one too
+ // (an Upgrade's, which `opts.pair` no longer says): its status
+ // once it is gone, as a terminal's job ends with its program.
+ // Not its child: no wait (ECHILD at once).
+ if (!far_link) {
var status: c_int = 0;
while (libc.waitpid(@intCast(start.joined.pid), &status, 0) < 0 and libc.errno(-1) == .INTR) {}
}
@@ -816,7 +818,7 @@ pub fn runClient(init: std.process.Init, opts: pardes.Options, path: []const u8,
// The blink: its screen left, the build at its start path
// exec'd, which enters it again.
screen.leave();
- Said.no(io, "{s}", .{client_loop.execAgain(&start, view)});
+ Said.no(io, "{s}", .{client_loop.execAgain(&start, view, null)});
},
}
}