summaryrefslogtreecommitdiff
path: root/src/tty
diff options
context:
space:
mode:
Diffstat (limited to 'src/tty')
-rw-r--r--src/tty/tty.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tty/tty.zig b/src/tty/tty.zig
index 5eb9a277..c85908d6 100644
--- a/src/tty/tty.zig
+++ b/src/tty/tty.zig
@@ -1034,6 +1034,7 @@ const Shell = struct {
.push_spawn = spawn,
.push_pty_write = ptyWrite,
.push_pty_resize = ptyResize,
+ .push_pty_signal = ptySignal,
.pull_tty_taken = ttyTaken,
.push_write_file = writeFile,
.push_write_dump = writeDump,
@@ -1393,6 +1394,13 @@ const Shell = struct {
}
}
+ /// `pty/ctl`'s `sig`. A pane with no pty of ours has nothing to signal,
+ /// which is the same silence `ptyWrite` above gives it.
+ fn ptySignal(ctx: ?*anyopaque, pane: u8, sig: pardes.PtySignal) void {
+ const s = of(ctx);
+ if (s.ptys[pane]) |pt| look.signalTty(pt.pid, pt.file.handle, sig);
+ }
+
/// Is a pane's tty still the prompt we forked? Lazy by construction — it
/// runs only where the core is about to type a command line, so the /proc
/// walk costs nothing on an ordinary frame. A pane with no pty of ours (a