diff options
Diffstat (limited to 'src/tty')
| -rw-r--r-- | src/tty/tty.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tty/tty.zig b/src/tty/tty.zig index 128a7ead..32f9138f 100644 --- a/src/tty/tty.zig +++ b/src/tty/tty.zig @@ -926,6 +926,7 @@ const Shell = struct { .pty_signal = ptySignal, .close_pty = closePty, .tty_taken = ttyTaken, + .kill_job = killJob, .write_file = writeFile, .write_dump = writeDump, .watch_file = watchFile, @@ -1244,6 +1245,12 @@ const Shell = struct { return host_io.ttyTaken(pt.pid, pt.file.handle); } + fn killJob(ctx: ?*anyopaque, pane: u8) bool { + const s = of(ctx); + const pt = s.ptys[pane] orelse return false; + return host_io.killJob(pt.pid, pt.file.handle); + } + fn writeFile(ctx: ?*anyopaque, pane: u8, path: []const u8, bytes: []const u8) void { const s = of(ctx); filesystem.write(s.core, path, bytes) catch |err| |
