diff options
Diffstat (limited to 'dev/tui/tui.zig')
| -rw-r--r-- | dev/tui/tui.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index e5e28f6e..72028b04 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -809,6 +809,12 @@ pub fn runClient(init: std.process.Init, opts: pardes.Options, path: []const u8, screen.leave(); Said.no(io, "{s}", .{start.said()}); }, + .upgrade => |view| { + // 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)}); + }, } } @@ -1271,6 +1277,10 @@ const Shell = struct { const core = s.core; var why: [800]u8 = undefined; const path = upgrade.exe() orelse return core.reportFailure(pane, "Upgrade: this process does not know the path it was started from"); + // A client of a session no daemon keeps is a pair's first (no other + // can attach): let go, it has no socket to find the session again + // by, and the session would end with its last link. + if (s.peers.count() > 0 and daemon.link < 0) return core.reportFailure(pane, "Upgrade: no daemon keeps this session, so its client could not join it again; this session stays as it is"); // 9P is served while the new binary is asked (its clients' clunks // and reads after the word are answered), and not after. pardes.turn.rest(); |
