summaryrefslogtreecommitdiff
path: root/runtime/session.zig
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/session.zig')
-rw-r--r--runtime/session.zig12
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/session.zig b/runtime/session.zig
index 75e8efcc..50497560 100644
--- a/runtime/session.zig
+++ b/runtime/session.zig
@@ -23,7 +23,8 @@
//! - `start(l)`: after the first effects, the ptys and the watches
//! read: its input, its readers, the listener's wake, a detached
//! session's first wait (`l.watch`).
-//! - `sent()`: after each step's unit went to the clients.
+//! - `sent()`: after each step's unit went to the clients (a pair's
+//! client gone with it: before its session ends).
//! - `upgradeAsked()`: an Upgrade asked in the step, done (it execs).
//! - `restoring(nc)`, `restored(l)`: a Restore's new core, before it
//! replaces the old one (its devices let go, what it is told of the
@@ -130,11 +131,18 @@ pub fn Loop(comptime Frontend: type) type {
try l.core.pump(l.host);
// Its unit to each replica client, and theirs taken in.
l.peers.boundary(l.core);
+ // Before a pair's end: its client's terminal put back (P48).
+ fe.sent();
+ // A pair's client stands for the frontend it was started
+ // for: at its focus in, a newer build said (upgrade.zig).
+ if (l.peers.pair_focused) {
+ l.peers.pair_focused = false;
+ upgrade.noticeNewer(l.core);
+ }
// A pair's session with no daemon ends with its last link:
// nothing could attach to it again; with one, when its last
// client left with a close (not a loss) and it is not kept.
if (l.peers.count() == 0 and (l.peers.closed or (o.pair != null and daemon.link < 0))) break;
- fe.sent();
upgrade.locate();
// Asked in the step (the word), done between steps: the
// session whole.