From ddcfd860ef05c37f5536038d8828cc81c0c4125c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 29 Oct 2026 22:18:34 -0300 Subject: upgrade: the Upgrade word (SPC s U, a tag, 9P) moves a running session onto the pardes installed where it started, in place, by exec at a step boundary: its dump in the DumpDir, its pty masters, terminals, stubs and daemon link kept open and named on the new command line, every view and running shell its own again; the daemon re-execs too, its registry on its command line; a build that cannot load the dump falls back to the old binary, or starts afresh with the shells adopted and the dump kept (test/daemon.py --upgrade, --upgrade --gui) Co-Authored-By: Claude Opus 5.5 --- src/host_io.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/host_io.zig') diff --git a/src/host_io.zig b/src/host_io.zig index 7b0fe9a2..46ee9afc 100644 --- a/src/host_io.zig +++ b/src/host_io.zig @@ -29,6 +29,9 @@ pub const Host = struct { detach: ?*const fn (ctx: ?*anyopaque) void = null, /// Adopt: the shells a dead session left, asked of the daemon. adopt: ?*const fn (ctx: ?*anyopaque, pane: u8) void = null, + /// Upgrade: this process exec'd as the pardes installed since, at + /// the step's end (upgrade.zig); `pane` hears why if it cannot be. + upgrade: ?*const fn (ctx: ?*anyopaque, pane: u8) void = null, spawn: ?*const fn (ctx: ?*anyopaque, pane: u8, cwd: []const u8) void = null, pty_write: ?*const fn (ctx: ?*anyopaque, pane: u8, bytes: []const u8) void = null, pty_resize: ?*const fn (ctx: ?*anyopaque, pane: u8, cols: u16, rows: u16) void = null, -- cgit v1.3