summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 22:18:34 -0300
committerGabriel Schneider <[email protected]>2026-10-29 23:37:00 -0300
commitddcfd860ef05c37f5536038d8828cc81c0c4125c (patch)
tree447d95dc0769273f2919747e30f5a24faec3fc21 /src/pardes.zig
parent2d86687b98f389232b213dfa67cfa731b0280fbb (diff)
downloadpardes-ddcfd860ef05c37f5536038d8828cc81c0c4125c.tar.gz
pardes-ddcfd860ef05c37f5536038d8828cc81c0c4125c.zip
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 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pardes.zig b/src/pardes.zig
index 0806cc78..081861ac 100644
--- a/src/pardes.zig
+++ b/src/pardes.zig
@@ -501,6 +501,7 @@ test {
_ = @import("body_layer.zig");
_ = @import("draw.zig");
_ = @import("dump.zig"); // its tests ran nowhere before
+ _ = @import("upgrade.zig");
_ = @import("recent.zig");
_ = @import("Store.zig");
_ = @import("Presentation.zig");
@@ -6048,6 +6049,13 @@ pub const Pardes = struct {
}
}
+ /// What a step leaves queued, its inputs and its effects, taken now:
+ /// the session at a step boundary (an Upgrade's dump, upgrade.zig).
+ pub fn settle(p: *Pardes) void {
+ while (p.nextQueued()) |ev| p.update(ev);
+ while (p.nextEffect()) |e| p.perform(e);
+ }
+
pub fn pump(p: *Pardes, host: Host) !void {
p.host = host;
const taped = tape.enter(p, .pump);