diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 12:06:13 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | 8b18331f5e3f6c346b992019163ec3f5b6e6b721 (patch) | |
| tree | f6e0236af8b0ac0428078d5ba512df10a1f3f43d /src/tty/tty.zig | |
| parent | 990c2e1b184e9cb1fddd8eb1b05a472cfb113dde (diff) | |
| download | pardes-8b18331f5e3f6c346b992019163ec3f5b6e6b721.tar.gz pardes-8b18331f5e3f6c346b992019163ec3f5b6e6b721.zip | |
Kill asks the host to signal at once and says when a shell has no job to signal
Kill queued a signal effect for later, so the job it saw running by its marks
could have ended, and another started, before the signal went; and with job
control off the job shares the shell's process group, so the host skipped it
and Kill reported nothing. Kill now calls the host's kill_job while it holds the
turn, and when the only job is the shell's own group says 'Kill: no job to
signal', which also fails a write of Kill to ctl.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/tty/tty.zig')
| -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| |
