diff options
Diffstat (limited to 'dev/tui')
| -rw-r--r-- | dev/tui/tui.zig | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index e441df92..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)}); }, } } @@ -1306,7 +1308,7 @@ const Shell = struct { core.settle(); // Its replica clients told, their views gone before the dump: each // dials the session again once it is back. - s.peers.refuseAll(core, "the session is upgrading to another build of pardes"); + s.peers.refuseAll(core); var rec: upgrade.Record = .{ .link = daemon.link, .stub = daemon.stub, .exe = path }; s.ptys.record(&rec); if (s.screen) |sc| if (sc.on) rec.addTty(.{ |
