summaryrefslogtreecommitdiff
path: root/src/ninep/pane.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep/pane.zig')
-rw-r--r--src/ninep/pane.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig
index 40d292c0..61073a55 100644
--- a/src/ninep/pane.zig
+++ b/src/ninep/pane.zig
@@ -41,6 +41,10 @@ pub const State = struct {
tag_snap: std.ArrayList(u8) = .empty,
pty_readers: u16 = 0,
pty_out: events.Queue = .{},
+ /// The pty/run open waiting on this shell's current command.
+ run: ?u8 = null,
+ /// The host started a shell it could not teach to mark its prompts.
+ unmarked: bool = false,
/// Installed during this update; /log hears about it once the update ends
/// and the pane has its file, name and place.
unannounced: bool = false,
@@ -225,7 +229,7 @@ pub fn fileSize(p: *Pardes, id: usize, f: PaneFile) u64 {
.pty_status => pty.status_len,
.pty_ctl => pty.ctlLen(pane),
.pty_data => events.pending(&pf.pty_out),
- .dir, .errors, .pty => 0,
+ .dir, .errors, .pty, .pty_run => 0,
};
}
@@ -293,6 +297,7 @@ pub fn read(p: *Pardes, req: Req, id: usize, pane: *Pane, file: PaneFile) Reply
.pty_status => pty.readStatus(p, req, id, pane),
.pty_data => pty.readData(p, req, pf),
.pty_ctl => pty.readCtl(p, req, pane),
+ .pty_run => pty.readRun(p, req),
.dir, .errors, .pty => Reply.fail(req.tag, E.PERM),
};
}
@@ -386,6 +391,7 @@ pub fn write(p: *Pardes, req: Req, id: usize, pane: *Pane, file: PaneFile) Reply
Reply.fail(req.tag, E.IO),
.pty_ctl => pty.writeCtl(p, req, id),
.pty_data => pty.writeData(p, req, id),
+ .pty_run => pty.writeRun(p, req, id, pane),
.dir, .pty, .pty_status => Reply.fail(req.tag, E.PERM),
};
}