summaryrefslogtreecommitdiff
path: root/src/tty/tty.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-29 22:56:07 -0300
committerGabriel Schneider <[email protected]>2026-10-29 23:37:00 -0300
commit370913ae34c69b7958911c6146612c77275f6ebf (patch)
tree61e4fd328e104afbb381d2fd161029d1be637aa7 /src/tty/tty.zig
parentddcfd860ef05c37f5536038d8828cc81c0c4125c (diff)
downloadpardes-370913ae34c69b7958911c6146612c77275f6ebf.tar.gz
pardes-370913ae34c69b7958911c6146612c77275f6ebf.zip
upgrade: a newer build at the path a session started from is said at a focus-in, once a build, the path read just after the first frame (off a startup's way); an upgraded process lets the binary it replaced go (held, its deleted file kept its blocks) and sweeps its old image's prompt files (kept for an exec that failed); test/daemon.py --upgrade asks through /ctl, checks the fds and prompt files level, and runs on FreeBSD (procstat, the daemon's registry, no kept old binary there)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/tty/tty.zig')
-rw-r--r--src/tty/tty.zig7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tty/tty.zig b/src/tty/tty.zig
index ef7688bc..14dc8042 100644
--- a/src/tty/tty.zig
+++ b/src/tty/tty.zig
@@ -1564,6 +1564,7 @@ fn localSession(
while (!core.quit) {
pardes.turn.bump(&pardes.turn.restores);
try core.pump(host);
+ upgrade.locate();
// Asked in the step (the word), done between steps: the session whole.
if (sh.upgrade_asked) |pane| sh.upgradeNow(pane);
// A terminal (`pardes --attach`) or an adopted shell, handed on by
@@ -1973,7 +1974,6 @@ const Shell = struct {
};
popped = true;
unlinkKittyShm();
- host_io.Shell.unlinkOwnedRcs();
daemon.upgraded();
if (s.fs) |f| f.flushOut();
const err_words = upgrade.exec(s.gpa, path, -1, &rec);
@@ -2261,7 +2261,10 @@ const Shell = struct {
},
.attach => |a| s.attachTerminal(a.tty, a.stub, null),
.adopted => |a| s.adoptShell(a.pid, a.fd),
- .focus_in => core.update(.{ .focus = true }),
+ .focus_in => {
+ core.update(.{ .focus = true });
+ upgrade.noticeNewer(core);
+ },
.focus_out => {
core.update(.pointer_leave);
core.update(.{ .focus = false });